about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/arch/mep/arch.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/miasm2/arch/mep/arch.py b/miasm2/arch/mep/arch.py
index 3f844c06..a4c7182a 100644
--- a/miasm2/arch/mep/arch.py
+++ b/miasm2/arch/mep/arch.py
@@ -939,7 +939,8 @@ class mep_target24_signed(mep_target24):
 
         mep_target24.decode(self, v)
         v = int(self.expr.arg)
-        self.expr = ExprInt(v, 24).signExtend(32)
+        self.expr = ExprInt(sign_ext(v, 24, 32), 32)
+
         return True
 
 
@@ -1160,7 +1161,7 @@ class mep_disp12_align2_signed(mep_disp12_align2):
         mep_disp12_align2.decode(self, v)
         v = int(self.expr.arg)
 
-        self.expr = ExprInt(v, 12).signExtend(32)
+        self.expr = ExprInt(sign_ext(v, 12, 32), 32)
         return True