From 34510e327e63df9ce29a1447497c7b5b7fb473d3 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 11 Feb 2021 12:27:47 +0000 Subject: target/ppc: Drop use of gdb_get_float64() and ldfq_p() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We used to make a distinction between 'float64'/'float32' types and the 'uint64_t'/'uint32_t' types, requiring special conversion operations to go between them. We've now dropped this distinction as unnecessary, and the 'float*' types remain primarily for documentation purposes when used in places like the function prototypes of TCG helper functions. This means that there's no need for a special gdb_get_float64() function to write a float64 value to the GDB protocol buffer; we can just use gdb_get_reg64(). Similarly, for reading a value out of the GDB buffer into a float64 we can use ldq_p() and need not use ldfq_p(). Signed-off-by: Peter Maydell Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Acked-by: David Gibson Message-Id: <20210208113428.7181-4-peter.maydell@linaro.org> Message-Id: <20210211122750.22645-13-alex.bennee@linaro.org> --- target/ppc/gdbstub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'target/ppc/gdbstub.c') diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index 01459dd31d..c28319fb97 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -130,7 +130,7 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray *buf, int n) gdb_get_regl(buf, env->gpr[n]); } else if (n < 64) { /* fprs */ - gdb_get_float64(buf, *cpu_fpr_ptr(env, n - 32)); + gdb_get_reg64(buf, *cpu_fpr_ptr(env, n - 32)); } else { switch (n) { case 64: @@ -184,7 +184,7 @@ int ppc_cpu_gdb_read_register_apple(CPUState *cs, GByteArray *buf, int n) gdb_get_reg64(buf, env->gpr[n]); } else if (n < 64) { /* fprs */ - gdb_get_float64(buf, *cpu_fpr_ptr(env, n - 32)); + gdb_get_reg64(buf, *cpu_fpr_ptr(env, n - 32)); } else if (n < 96) { /* Altivec */ gdb_get_reg64(buf, n - 64); @@ -241,7 +241,7 @@ int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) env->gpr[n] = ldtul_p(mem_buf); } else if (n < 64) { /* fprs */ - *cpu_fpr_ptr(env, n - 32) = ldfq_p(mem_buf); + *cpu_fpr_ptr(env, n - 32) = ldq_p(mem_buf); } else { switch (n) { case 64: @@ -291,7 +291,7 @@ int ppc_cpu_gdb_write_register_apple(CPUState *cs, uint8_t *mem_buf, int n) env->gpr[n] = ldq_p(mem_buf); } else if (n < 64) { /* fprs */ - *cpu_fpr_ptr(env, n - 32) = ldfq_p(mem_buf); + *cpu_fpr_ptr(env, n - 32) = ldq_p(mem_buf); } else { switch (n) { case 64 + 32: -- cgit v1.2.3