[PATCH 3/7] target/alpha: Replace target_ulong -> uint64_t in gdb_write_register()

Philippe Mathieu-Daudé posted 7 patches 6 days, 15 hours ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>
[PATCH 3/7] target/alpha: Replace target_ulong -> uint64_t in gdb_write_register()
Posted by Philippe Mathieu-Daudé 6 days, 15 hours ago
On Alpha, the target_ulong type expands to uint64_t.
Besides, ldq_be_p() returns a uint64_t type, and all
field / values accessed are uint64_t, see target/alpha/cpu.h:

  200 typedef struct CPUArchState {
  201     uint64_t ir[31];
  202     float64 fir[31];
  203     uint64_t pc;
  204     uint64_t unique;
  ...
  443 void cpu_alpha_store_fpcr (CPUAlphaState *env, uint64_t val);
  445 void cpu_alpha_store_gr(CPUAlphaState *env, unsigned reg, uint64_t val);

Use uint64_t instead of target_ulong.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/alpha/gdbstub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/alpha/gdbstub.c b/target/alpha/gdbstub.c
index 1a7e2dd9202..a7110e8d1eb 100644
--- a/target/alpha/gdbstub.c
+++ b/target/alpha/gdbstub.c
@@ -59,7 +59,7 @@ int alpha_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
 int alpha_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
 {
     CPUAlphaState *env = cpu_env(cs);
-    target_ulong tmp = ldq_le_p(mem_buf);
+    uint64_t tmp = ldq_le_p(mem_buf);
     CPU_DoubleU d;
 
     switch (n) {
-- 
2.52.0