about summary refs log tree commit diff stats
path: root/miasm2/arch/msp430/arch.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/arch/msp430/arch.py')
-rw-r--r--miasm2/arch/msp430/arch.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/miasm2/arch/msp430/arch.py b/miasm2/arch/msp430/arch.py
index 0e3b4acd..34993ebc 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
 
@@ -584,3 +583,4 @@ offimm = bs(l=10, cls=(msp430_offs,), fname="offs")
 bs_f2_jcc = bs_name(l=3, name={'jnz': 0, 'jz': 1, 'jnc': 2, 'jc': 3, 'jn': 4,
                                'jge': 5, 'jl': 6, 'jmp': 7})
 addop("f2_3", [bs('001'), bs_f2_jcc, offimm])
+