about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm/arch/mips32/sem.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/miasm/arch/mips32/sem.py b/miasm/arch/mips32/sem.py
index c7d21aee..a7e649b0 100644
--- a/miasm/arch/mips32/sem.py
+++ b/miasm/arch/mips32/sem.py
@@ -3,7 +3,7 @@ from miasm.ir.ir import IntermediateRepresentation, IRBlock, AssignBlock
 from miasm.arch.mips32.arch import mn_mips32
 from miasm.arch.mips32.regs import R_LO, R_HI, PC, RA, ZERO, exception_flags
 from miasm.core.sembuilder import SemBuilder
-from miasm.jitter.csts import EXCEPT_DIV_BY_ZERO
+from miasm.jitter.csts import EXCEPT_DIV_BY_ZERO, EXCEPT_SOFT_BP
 
 
 # SemBuilder context
@@ -393,6 +393,11 @@ def tlbwr():
 def tlbr():
     "TODO XXX"
 
+def break_(ir, instr):
+    e = []
+    e.append(ExprAssign(exception_flags, ExprInt(EXCEPT_SOFT_BP, 32)))
+    return e, []
+
 def ins(ir, instr, a, b, c, d):
     e = []
     pos = int(c)
@@ -599,7 +604,8 @@ mnemo_func.update({
         'xori': l_xor,
         'clz': clz,
         'teq': teq,
-        'tne': tne
+        'tne': tne,
+        'break': break_
         })
 
 def get_mnemo_expr(ir, instr, *args):