about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPierre Lalet <pierre@droids-corp.org>2016-02-09 09:41:43 +0100
committerPierre Lalet <pierre@droids-corp.org>2016-02-09 09:41:43 +0100
commitf094d9baffa31fc5c7d32e7999687509768031c8 (patch)
treed3a6d533d98ad4a1a64a9179793b140f5fcd3af4
parentd038675f6170824f9dd139ab6743a8b136612f96 (diff)
parent12adc0b1aacc0a33e61573cca2fd15484117426b (diff)
downloadmiasm-f094d9baffa31fc5c7d32e7999687509768031c8.tar.gz
miasm-f094d9baffa31fc5c7d32e7999687509768031c8.zip
Merge pull request #322 from serpilliere/fix_tsc_gpreg
X86/jitter: fix tsc reg gpreg
-rw-r--r--miasm2/jitter/arch/JitCore_x86.c8
-rw-r--r--miasm2/jitter/arch/JitCore_x86.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/miasm2/jitter/arch/JitCore_x86.c b/miasm2/jitter/arch/JitCore_x86.c
index 9ee791e0..b406e755 100644
--- a/miasm2/jitter/arch/JitCore_x86.c
+++ b/miasm2/jitter/arch/JitCore_x86.c
@@ -54,8 +54,8 @@ reg_dict gpreg_dict[] = { {.name = "RAX", .offset = offsetof(vm_cpu_t, RAX)},
 			  {.name = "MM6", .offset = offsetof(vm_cpu_t, MM6)},
 			  {.name = "MM7", .offset = offsetof(vm_cpu_t, MM7)},
 
-			  {.name = "TSC1", .offset = offsetof(vm_cpu_t, tsc1)},
-			  {.name = "TSC2", .offset = offsetof(vm_cpu_t, tsc2)},
+			  {.name = "tsc1", .offset = offsetof(vm_cpu_t, tsc1)},
+			  {.name = "tsc2", .offset = offsetof(vm_cpu_t, tsc2)},
 
 };
 
@@ -801,8 +801,8 @@ static PyGetSetDef JitCpu_getseters[] = {
     {"MM6", (getter)JitCpu_get_MM6, (setter)JitCpu_set_MM6, "MM6", NULL},
     {"MM7", (getter)JitCpu_get_MM7, (setter)JitCpu_set_MM7, "MM7", NULL},
 
-    {"TSC1", (getter)JitCpu_get_tsc1, (setter)JitCpu_set_tsc1, "TSC1", NULL},
-    {"TSC2", (getter)JitCpu_get_tsc2, (setter)JitCpu_set_tsc2, "TSC2", NULL},
+    {"tsc1", (getter)JitCpu_get_tsc1, (setter)JitCpu_set_tsc1, "tsc1", NULL},
+    {"tsc2", (getter)JitCpu_get_tsc2, (setter)JitCpu_set_tsc2, "tsc2", NULL},
 
 
     {NULL}  /* Sentinel */
diff --git a/miasm2/jitter/arch/JitCore_x86.h b/miasm2/jitter/arch/JitCore_x86.h
index c90c10b8..ac794d8e 100644
--- a/miasm2/jitter/arch/JitCore_x86.h
+++ b/miasm2/jitter/arch/JitCore_x86.h
@@ -132,11 +132,11 @@ typedef struct {
 	unsigned int reg_float_ds_new;
 
 
-	unsigned int tsc1;
-	unsigned int tsc2;
+	uint64_t tsc1;
+	uint64_t tsc2;
 
-	unsigned int tsc1_new;
-	unsigned int tsc2_new;
+	uint64_t tsc1_new;
+	uint64_t tsc2_new;
 
 
 	uint64_t ES;