diff options
| author | IridiumXOR <oliveriandrea@gmail.com> | 2020-09-23 17:51:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-23 17:51:52 +0200 |
| commit | 218492cd10b339a8d47d2fdbd61953fcf954fb8b (patch) | |
| tree | be28808ead30c0e76a0d2e19ad9082f3c60a77fc | |
| parent | a84dc3602c116caf43cde259b3ddac5347e007c7 (diff) | |
| download | miasm-218492cd10b339a8d47d2fdbd61953fcf954fb8b.tar.gz miasm-218492cd10b339a8d47d2fdbd61953fcf954fb8b.zip | |
Add TLBR and BREAK opcode semantic (#1282)
* Add TLBR and BREAK opcode semantic * Introducing except flag mod
| -rw-r--r-- | miasm/arch/mips32/sem.py | 10 |
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): |