Skip to contentSkip to conversation

target/i386: Replace target_ulong -> uint64_t for TARGET_X86_64

PATCH Applied Philippe Mathieu-Daudé 2 participants 3 messages Mar 15 – Mar 23

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/i386: Replace target_ulong -> uint64_t for TARGET_X86_64

These registers are only available on 64-bit builds, thus always handled as 64-bit. This isn't even a migration break because they are migrated as 64-bit since the beginning (see commit 02536f8b1f9 "x86_64 save/restore").

---
 target/i386/cpu.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
target/i386/cpu.h +4 -4
index e5ae29f8af1..b0c730b3390 100644
@@ -2058,10 +2058,10 @@ typedef struct CPUArchState {
     uint64_t vm_hsave;
 
 #ifdef TARGET_X86_64
-    target_ulong lstar;
-    target_ulong cstar;
-    target_ulong fmask;
-    target_ulong kernelgsbase;
+    uint64_t lstar;
+    uint64_t cstar;
+    uint64_t fmask;
+    uint64_t kernelgsbase;
 
     /* FRED MSRs */
     uint64_t fred_rsp0;
Signature · 1 line
2.53.0
Reviewed-by Anton Johansson on v1 1/1
#1 lore raw
Quoted 32 lines · Philippe Mathieu-Daudé

These registers are only available on 64-bit builds, thus always handled as 64-bit. This isn't even a migration break because they are migrated as 64-bit since the beginning (see commit 02536f8b1f9 "x86_64 save/restore").

---
 target/i386/cpu.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
target/i386/cpu.h +4 -4
index e5ae29f8af1..b0c730b3390 100644
@@ -2058,10 +2058,10 @@ typedef struct CPUArchState {
     uint64_t vm_hsave;
 
 #ifdef TARGET_X86_64
-    target_ulong lstar;
-    target_ulong cstar;
-    target_ulong fmask;
-    target_ulong kernelgsbase;
+    uint64_t lstar;
+    uint64_t cstar;
+    uint64_t fmask;
+    uint64_t kernelgsbase;
 
     /* FRED MSRs */
     uint64_t fred_rsp0;
Signature · 1 line
2.53.0
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 9 lines · Philippe Mathieu-Daudé

These registers are only available on 64-bit builds, thus always handled as 64-bit. This isn't even a migration break because they are migrated as 64-bit since the beginning (see commit 02536f8b1f9 "x86_64 save/restore").

---
  target/i386/cpu.h | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

Queued for 11.1, thanks.