about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2014-08-21 13:09:12 +0200
committerserpilliere <devnull@localhost>2014-08-21 13:09:12 +0200
commit707d83c350e18b1121eee3d0adebd8031ebbf941 (patch)
tree7f3236b68b85d701f04edc16a3575ef86cd56ff0
parentcc2b6e079aff0a3c6172a58eb8cb76f885add7f9 (diff)
downloadmiasm-707d83c350e18b1121eee3d0adebd8031ebbf941.tar.gz
miasm-707d83c350e18b1121eee3d0adebd8031ebbf941.zip
msp430: fix asm dst
-rw-r--r--miasm2/arch/msp430/arch.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/miasm2/arch/msp430/arch.py b/miasm2/arch/msp430/arch.py
index 0e3b4acd..e734a2e3 100644
--- a/miasm2/arch/msp430/arch.py
+++ b/miasm2/arch/msp430/arch.py
@@ -179,7 +179,7 @@ class instruction_msp430(instruction):
         return [self.args[0]]
 
     def get_symbol_size(self, symbol, symbol_pool):
-        return self.mode
+        return 16
 
     def fixDstOffset(self):
         e = self.args[0]
@@ -190,7 +190,7 @@ class instruction_msp430(instruction):
             log.warning('dynamic dst %r' % e)
             return
         # return ExprInt32(e.arg - (self.offset + self.l))
-        self.args[0] = ExprInt_fromsize(self.mode, e.arg)
+        self.args[0] = ExprInt_fromsize(16, e.arg - (self.offset + self.l))
 
     def get_info(self, c):
         pass
@@ -202,7 +202,6 @@ class instruction_msp430(instruction):
     def get_args_expr(self):
         args = []
         for a in self.args:
-            # a = a.replace_expr(replace_regs[self.mode])
             args.append(a)
         return args