diff options
Diffstat (limited to 'miasm2/arch')
| -rw-r--r-- | miasm2/arch/arm/arch.py | 5 | ||||
| -rw-r--r-- | miasm2/arch/x86/arch.py | 2 | ||||
| -rw-r--r-- | miasm2/arch/x86/sem.py | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/miasm2/arch/arm/arch.py b/miasm2/arch/arm/arch.py index b08d7940..e7054b51 100644 --- a/miasm2/arch/arm/arch.py +++ b/miasm2/arch/arm/arch.py @@ -3217,7 +3217,8 @@ armtop("mov", [bs('11101010010'), scc, bs('1111'), bs('0'), imm5_3, rd_nosppc, i armtop("orr", [bs('11110'), imm12_1, bs('00010'), scc, rn_nosppc, bs('0'), imm12_3, rd, imm12_8] ) -armtop("add", [bs('11110'), imm12_1, bs('01000'), scc, rn, bs('0'), imm12_3, rd, imm12_8], [rd, rn, imm12_8]) +armtop("add", [bs('11110'), imm12_1, bs('01000'), bs('0'), rn, bs('0'), imm12_3, rd_nopc, imm12_8], [rd_nopc, rn, imm12_8]) +armtop("adds",[bs('11110'), imm12_1, bs('01000'), bs('1'), rn, bs('0'), imm12_3, rd_nopc, imm12_8], [rd_nopc, rn, imm12_8]) armtop("bic", [bs('11110'), imm12_1, bs('00001'), scc, rn_nosppc, bs('0'), imm12_3, rd, imm12_8], [rd, rn_nosppc, imm12_8]) armtop("and", [bs('11110'), imm12_1, bs('00000'), scc, rn, bs('0'), imm12_3, rd_nopc, imm12_8], [rd_nopc, rn, imm12_8]) armtop("sub", [bs('11110'), imm12_1, bs('01101'), scc, rn, bs('0'), imm12_3, rd_nopc, imm12_8], [rd_nopc, rn, imm12_8]) @@ -3227,6 +3228,8 @@ armtop("cmp", [bs('11110'), imm12_1, bs('01101'), bs('1'), rn, bs('0'), imm12_3, armtop("cmp", [bs('11101011101'), bs('1'), rn, bs('0'), imm5_3, bs('1111'), imm5_2, imm_stype, rm_sh], [rn, rm_sh] ) +armtop("cmn", [bs('11110'), imm12_1, bs('01000'), bs('1'), rn, bs('0'), imm12_3, bs('1111'), imm12_8], [rn, imm12_8]) + armtop("mvn", [bs('11110'), imm12_1, bs('00011'), scc, bs('1111'), bs('0'), imm12_3, rd, imm12_8]) armtop("rsb", [bs('11110'), imm12_1, bs('01110'), scc, rn_nosppc, bs('0'), imm12_3, rd, imm12_8], [rd, rn_nosppc, imm12_8]) diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py index 11c1e00f..7f9d50e6 100644 --- a/miasm2/arch/x86/arch.py +++ b/miasm2/arch/x86/arch.py @@ -902,7 +902,7 @@ class mn_x86(cls_mn): if hasattr(c, "fadmode") and v_admode(c) != c.fadmode.mode: continue # relative dstflow must not have opmode set - # (affect IP instead of EIP for instance) + # (assign IP instead of EIP for instance) if (instr.dstflow() and instr.name not in ["JCXZ", "JECXZ", "JRCXZ"] and len(instr.args) == 1 and diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index e01adcbc..862240e5 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -1710,7 +1710,7 @@ def div(ir, instr, src1): c_d = m2_expr.ExprOp('udiv', src2, src1.zeroExtend(src2.size)) c_r = m2_expr.ExprOp('umod', src2, src1.zeroExtend(src2.size)) - # if 8 bit div, only ax is affected + # if 8 bit div, only ax is assigned if size == 8: e.append(m2_expr.ExprAssign(src2, m2_expr.ExprCompose(c_d[:8], c_r[:8]))) else: @@ -1757,7 +1757,7 @@ def idiv(ir, instr, src1): c_d = m2_expr.ExprOp('sdiv', src2, src1.signExtend(src2.size)) c_r = m2_expr.ExprOp('smod', src2, src1.signExtend(src2.size)) - # if 8 bit div, only ax is affected + # if 8 bit div, only ax is assigned if size == 8: e.append(m2_expr.ExprAssign(src2, m2_expr.ExprCompose(c_d[:8], c_r[:8]))) else: @@ -4026,7 +4026,7 @@ cmpordsd = vec_op_clip('ord', 64, lambda x: _float_compare_to_mask(x)) def pand(_, instr, dst, src): e = [] result = dst & src - # No flag affected + # No flag assigned e.append(m2_expr.ExprAssign(dst, result)) return e, [] @@ -4034,7 +4034,7 @@ def pand(_, instr, dst, src): def pandn(_, instr, dst, src): e = [] result = (dst ^ dst.mask) & src - # No flag affected + # No flag assigned e.append(m2_expr.ExprAssign(dst, result)) return e, [] |