diff options
Diffstat (limited to 'miasm2/arch/x86/sem.py')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 862240e5..b2ef5a43 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -1321,7 +1321,7 @@ def _tpl_eflags(tmp): def popfw(ir, instr): - tmp = ir.ExprMem(mRSP[instr.mode], 32) + tmp = ir.ExprMem(mRSP[instr.mode], 16) e = _tpl_eflags(tmp) e.append( m2_expr.ExprAssign(mRSP[instr.mode], mRSP[instr.mode] + m2_expr.ExprInt(2, mRSP[instr.mode].size))) @@ -4938,6 +4938,14 @@ def emms(ir, instr): # Implemented as a NOP return [], [] +def endbr64(ir, instr): + # Implemented as a NOP + return [], [] + +def endbr32(ir, instr): + # Implemented as a NOP + return [], [] + # Common value without too many option, 0x1fa0 STMXCSR_VALUE = 0x1fa0 def stmxcsr(ir, instr, dst): @@ -5584,6 +5592,8 @@ mnemo_func = {'mov': mov, "movmskpd": movmskpd, "stmxcsr": stmxcsr, "ldmxcsr": ldmxcsr, + "endbr64": endbr64, + "endbr32": endbr32, } @@ -5669,9 +5679,9 @@ class ir_x86_16(IntermediateRepresentation): # end condition if zf_val is None: c_cond = cond_dec - elif instr.additional_info.g1.value & 2: # REPNE + elif instr.additional_info.g1.value & 2: # REPNE and REPNZ c_cond = cond_dec | zf - elif instr.additional_info.g1.value & 4: # REP + elif instr.additional_info.g1.value & 12: # REPE, REP and REPZ c_cond = cond_dec | (zf ^ m2_expr.ExprInt(1, 1)) # gen while |