diff options
| author | serpilliere <devnull@localhost> | 2014-07-03 10:11:55 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2014-07-03 10:11:55 +0200 |
| commit | fb7589dd51b0cff632b71b7098c2791ba45e5b88 (patch) | |
| tree | 799c232377598cdd177a199db3fe2524cdb95bcc /miasm2/arch/arm/sem.py | |
| parent | 9ecffee0e1d3370d7a69b4dc8d617f94d8f360a9 (diff) | |
| download | miasm-fb7589dd51b0cff632b71b7098c2791ba45e5b88.tar.gz miasm-fb7589dd51b0cff632b71b7098c2791ba45e5b88.zip | |
Arm: add mnemo/sem uxtb, uxth, ubfx
Diffstat (limited to 'miasm2/arch/arm/sem.py')
| -rw-r--r-- | miasm2/arch/arm/sem.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/miasm2/arch/arm/sem.py b/miasm2/arch/arm/sem.py index 8bf5d701..07db3cfb 100644 --- a/miasm2/arch/arm/sem.py +++ b/miasm2/arch/arm/sem.py @@ -809,6 +809,35 @@ def cbnz(ir, instr, a, b): return dst, e + +def uxtb(ir, instr, a, b): + e = [] + e.append(ExprAff(a, b[:8].zeroExtend(32))) + dst = None + if PC in a.get_r(): + dst = PC + return dst, e + +def uxth(ir, instr, a, b): + e = [] + e.append(ExprAff(a, b[:16].zeroExtend(32))) + dst = None + if PC in a.get_r(): + dst = PC + return dst, e + +def ubfx(ir, instr, a, b, c, d): + e = [] + c = int(c.arg) + d = int(d.arg) + e.append(ExprAff(a, b[c:c+d].zeroExtend(32))) + dst = None + if PC in a.get_r(): + dst = PC + return dst, e + + + COND_EQ = 0 COND_NE = 1 COND_CS = 2 @@ -935,6 +964,9 @@ mnemo_condm0 = {'add': add, 'strh': strh, 'ldrsh': ldrsh, 'ldsh': ldrsh, + 'uxtb': uxtb, + 'uxth': uxth, + 'ubfx': ubfx, } mnemo_condm1 = {'adds': add, |