X86: Implement the LOOP instructions.
--HG-- extra : convert_revision : 3ccd0565c83b6d9c9b63f9f7ac2b67839a2c714f
This commit is contained in:
@@ -472,9 +472,9 @@
|
||||
}
|
||||
##include "x87.isa"
|
||||
0x1C: decode OPCODE_OP_BOTTOM3 {
|
||||
0x0: loopne_Jb();
|
||||
0x1: loope_Jb();
|
||||
0x2: loop_Jb();
|
||||
0x0: Inst::LOOPNE(Jb);
|
||||
0x1: Inst::LOOPE(Jb);
|
||||
0x2: Inst::LOOP(Jb);
|
||||
0x3: Inst::JRCX(Jb);
|
||||
0x4: in_Al_Ib();
|
||||
0x5: in_eAX_Ib();
|
||||
|
||||
@@ -53,8 +53,22 @@
|
||||
#
|
||||
# Authors: Gabe Black
|
||||
|
||||
microcode = ""
|
||||
#let {{
|
||||
# class LOOPcc(Inst):
|
||||
# "GenFault ${new UnimpInstFault}"
|
||||
#}};
|
||||
microcode = '''
|
||||
def macroop LOOP_I {
|
||||
rdip t1
|
||||
subi rcx, rcx, 1, flags=(EZF,), dataSize=asz
|
||||
wripi t1, imm, flags=(nCEZF,)
|
||||
};
|
||||
|
||||
def macroop LOOPNE_I {
|
||||
rdip t1
|
||||
subi rcx, rcx, 1, flags=(EZF,), dataSize=asz
|
||||
wripi t1, imm, flags=(CSTRnZnEZF,)
|
||||
};
|
||||
|
||||
def macroop LOOPE_I {
|
||||
rdip t1
|
||||
subi rcx, rcx, 1, flags=(EZF,), dataSize=asz
|
||||
wripi t1, imm, flags=(CSTRZnEZF,)
|
||||
};
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user