about summary refs log tree commit diff stats
path: root/miasm2/arch/mips32/arch.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2015-10-28 09:01:03 +0100
committerCamille Mougey <commial@gmail.com>2015-10-28 09:01:03 +0100
commit89b7cc0b3bdcff8ef57dba232c9aae544c3ded35 (patch)
treeeddb33c00193081e0bb616f3f34460858822c304 /miasm2/arch/mips32/arch.py
parent3f9071a50671bb7a72d68e2dece83795aa9f9728 (diff)
parent1507343ca4b2d437ca51c137ce8be68dd5bcb9da (diff)
downloadmiasm-89b7cc0b3bdcff8ef57dba232c9aae544c3ded35.tar.gz
miasm-89b7cc0b3bdcff8ef57dba232c9aae544c3ded35.zip
Merge pull request #243 from serpilliere/fix_mips_br
Fix mips br
Diffstat (limited to 'miasm2/arch/mips32/arch.py')
-rw-r--r--miasm2/arch/mips32/arch.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/miasm2/arch/mips32/arch.py b/miasm2/arch/mips32/arch.py
index 12f4ff8e..a5463b6f 100644
--- a/miasm2/arch/mips32/arch.py
+++ b/miasm2/arch/mips32/arch.py
@@ -126,7 +126,7 @@ class instruction_mips32(cpu.instruction):
 
         if not isinstance(e, ExprInt):
             return
-        ad = e.arg + self.offset + 4
+        ad = e.arg + self.offset
         l = symbol_pool.getby_offset_create(ad)
         s = ExprId(l, e.size)
         self.args[ndx] = s
@@ -174,18 +174,14 @@ class instruction_mips32(cpu.instruction):
     def fixDstOffset(self):
         ndx = self.get_dst_num()
         e = self.args[ndx]
-        print 'FIX', ndx, e, self.offset, self.l
         if self.offset is None:
             raise ValueError('symbol not resolved %s' % self.l)
         if not isinstance(e, ExprInt):
             return
         off = e.arg - self.offset
-        print "diff", e, hex(self.offset)
-        print hex(off)
         if int(off % 4):
             raise ValueError('strange offset! %r' % off)
         self.args[ndx] = ExprInt32(off)
-        print 'final', self
 
     def get_args_expr(self):
         args = [a for a in self.args]
@@ -444,8 +440,6 @@ class mips32_eposh(mips32_imm, cpu.m_arg):
         return True
 
 
-class mips32_imm(mips32_imm):
-    pass
 
 
 class mips32_cpr(cpu.m_arg):