diff options
| author | serpilliere <devnull@localhost> | 2014-08-22 10:40:01 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2014-08-22 10:40:01 +0200 |
| commit | dad135e2931773e2ae12e4096258a4c6d7596ffb (patch) | |
| tree | b9e9a030d8d6ac676afecdd5b2b97ae81aa8d7d8 | |
| parent | 45b8751e9e3c2441e3cc8d0d10ca7ab58d21380a (diff) | |
| download | miasm-dad135e2931773e2ae12e4096258a4c6d7596ffb.tar.gz miasm-dad135e2931773e2ae12e4096258a4c6d7596ffb.zip | |
Arm: add exception_flags; fix svc sem
| -rw-r--r-- | miasm2/arch/arm/regs.py | 8 | ||||
| -rw-r--r-- | miasm2/arch/arm/sem.py | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/miasm2/arch/arm/regs.py b/miasm2/arch/arm/regs.py index 2787605a..29b2c805 100644 --- a/miasm2/arch/arm/regs.py +++ b/miasm2/arch/arm/regs.py @@ -9,6 +9,8 @@ from miasm2.expression.expression import * regs32_str = ["R%d" % i for i in xrange(13)] + ["SP", "LR", "PC"] regs32_expr = [ExprId(x, 32) for x in regs32_str] +exception_flags = ExprId('exception_flags', 32) + R0 = regs32_expr[0] R1 = regs32_expr[1] @@ -63,7 +65,8 @@ cf_init = ExprId("cf_init", size=1) all_regs_ids = [ R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, SP, LR, PC, - zf, nf, of, cf + zf, nf, of, cf, + exception_flags ] all_regs_ids_no_alias = all_regs_ids @@ -74,7 +77,8 @@ all_regs_ids_init = [R0_init, R1_init, R2_init, R3_init, R4_init, R5_init, R6_init, R7_init, R8_init, R9_init, R10_init, R11_init, R12_init, SP_init, LR_init, PC_init, - zf_init, nf_init, of_init, cf_init + zf_init, nf_init, of_init, cf_init, + ExprInt32(0) ] regs_init = {} diff --git a/miasm2/arch/arm/sem.py b/miasm2/arch/arm/sem.py index 498017c9..c2ce1b55 100644 --- a/miasm2/arch/arm/sem.py +++ b/miasm2/arch/arm/sem.py @@ -701,7 +701,7 @@ def stmdb(ir, instr, a, b): def svc(ir, instr, a): # XXX TODO implement e = [ - ExprAff(ExprId('vmmngr.exception_flags'), ExprInt32(EXCEPT_PRIV_INSN))] + ExprAff(ExprId(exception_flags), ExprInt32(EXCEPT_PRIV_INSN))] return None, e |