about summary refs log tree commit diff stats
path: root/miasm2/arch/mep/arch.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2018-08-06 22:26:36 +0200
committerGitHub <noreply@github.com>2018-08-06 22:26:36 +0200
commite38b5dd91d10ad66d537675e4592f68eda9fcce2 (patch)
tree912333c96758461e9c226d8da037c0084d3c10a0 /miasm2/arch/mep/arch.py
parente4a255d9c6175b5d9f2ab15471d848705fe1cc4e (diff)
parentefc5ec2e8c394475e3a2be68bc29821e4d980b1b (diff)
downloadmiasm-e38b5dd91d10ad66d537675e4592f68eda9fcce2.tar.gz
miasm-e38b5dd91d10ad66d537675e4592f68eda9fcce2.zip
Merge pull request #816 from serpilliere/operator_high_level
Operator high level
Diffstat (limited to 'miasm2/arch/mep/arch.py')
-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