about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2015-02-10 15:35:35 +0100
committerCamille Mougey <commial@gmail.com>2015-02-10 15:35:35 +0100
commitdf8d59c99522ef62923622f9484dec5bf51443a8 (patch)
tree19b3e9de3936c246b647b23cda7415e972343a56
parentd80ab06b15a0c63b018677ac37ef0937e11e18c2 (diff)
parent6dbb10610c93da61457ebc4b7717ca16641f6dcc (diff)
downloadmiasm-df8d59c99522ef62923622f9484dec5bf51443a8.tar.gz
miasm-df8d59c99522ef62923622f9484dec5bf51443a8.zip
Merge pull request #61 from serpilliere/x86_rdtsc
Arch/X86: fix rdtsc semantic (32/64 bit)
-rw-r--r--miasm2/arch/x86/sem.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index 36d8e618..73ce8d1a 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -2333,11 +2333,9 @@ def hlt(ir, instr):
 
 def rdtsc(ir, instr):
     e = []
-    myEAX = mRAX[instr.mode]
-    myEDX = mRDX[instr.mode]
     e.append(ExprAff(tsc1, tsc1 + ExprInt32(1)))
-    e.append(ExprAff(myEAX, tsc1))
-    e.append(ExprAff(myEDX, tsc2))
+    e.append(ExprAff(mRAX[32], tsc1))
+    e.append(ExprAff(mRDX[32], tsc2))
     return e, []