about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/arch/mips32/ira.py2
-rw-r--r--miasm2/arch/mips32/sem.py8
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,