diff options
| author | serpilliere <devnull@localhost> | 2014-09-12 00:35:25 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2014-09-12 00:35:25 +0200 |
| commit | 16b46b4ebebe2584512daf664ff4753fd9d0159b (patch) | |
| tree | 0343e8428bcbe9fa62bc19dc7da917d0990a4384 | |
| parent | 56db4204751bcda47b6a653f6f2347b254b976d9 (diff) | |
| download | focaccia-miasm-16b46b4ebebe2584512daf664ff4753fd9d0159b.tar.gz focaccia-miasm-16b46b4ebebe2584512daf664ff4753fd9d0159b.zip | |
mips: add mnemo; fix irdst
| -rw-r--r-- | miasm2/arch/mips32/ira.py | 2 | ||||
| -rw-r--r-- | miasm2/arch/mips32/sem.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/miasm2/arch/mips32/ira.py b/miasm2/arch/mips32/ira.py index bc9e2439..cb084411 100644 --- a/miasm2/arch/mips32/ira.py +++ b/miasm2/arch/mips32/ira.py @@ -55,7 +55,7 @@ class ir_a_mips32(ir_mips32, ira): lbl = bloc.get_next() new_lbl = self.gen_label() irs = self.call_effects(pc_val) - irs.append([ExprAff(IRDst, ExprId(lbl, size=self.pc.size))]) + irs.append([ExprAff(self.IRDst, ExprId(lbl, size=self.pc.size))]) nbloc = irbloc(new_lbl, irs) nbloc.lines = [l] self.blocs[new_lbl] = nbloc diff --git a/miasm2/arch/mips32/sem.py b/miasm2/arch/mips32/sem.py index cc51d2af..8f8efdf4 100644 --- a/miasm2/arch/mips32/sem.py +++ b/miasm2/arch/mips32/sem.py @@ -60,6 +60,13 @@ def lhu(ir, instr, a, b): e.append(ExprAff(a, b.zeroExtend(32))) return e, [] + +def lb(ir, instr, a, b): + e = [] + b = ExprMem(b.arg, 8) + e.append(ExprAff(a, b.signExtend(32))) + return e, [] + def beq(ir, instr, a, b, c): e = [] n = ExprId(ir.get_next_break_label(instr)) @@ -427,6 +434,7 @@ mnemo_func = { "b" : l_b, "lbu" : lbu, "lhu" : lhu, + "lb" : lb, "beq" : beq, "bgez" : bgez, "bltz" : bltz, |