diff options
| -rw-r--r-- | miasm2/arch/mips32/arch.py | 2 | ||||
| -rw-r--r-- | miasm2/core/parse_asm.py | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/miasm2/arch/mips32/arch.py b/miasm2/arch/mips32/arch.py index c9630d36..f64e09e5 100644 --- a/miasm2/arch/mips32/arch.py +++ b/miasm2/arch/mips32/arch.py @@ -189,7 +189,7 @@ class instruction_mips32(cpu.instruction): class mn_mips32(cpu.cls_mn): - delayslot = 0 + delayslot = 1 name = "mips32" regs = regs bintree = {} diff --git a/miasm2/core/parse_asm.py b/miasm2/core/parse_asm.py index 646ad445..840b88db 100644 --- a/miasm2/core/parse_asm.py +++ b/miasm2/core/parse_asm.py @@ -238,10 +238,9 @@ def parse_txt(mnemo, attrib, txt, symbol_pool=None): delayslot = 0 while i < len(lines): if delayslot: + delayslot -= 1 if delayslot == 0: state = STATE_NO_BLOC - else: - delayslot -= 1 line = lines[i] # no current block if state == STATE_NO_BLOC: @@ -311,9 +310,7 @@ def parse_txt(mnemo, attrib, txt, symbol_pool=None): if not line.splitflow(): block_to_nlink = None - delayslot = line.delayslot - if delayslot == 0: - state = STATE_NO_BLOC + delayslot = line.delayslot + 1 else: raise RuntimeError("unknown class %s" % line.__class__) i += 1 |