[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/15] target/sh4: Drop use of gdb_get_float32() and ldfl_p()
From: |
Alex Bennée |
Subject: |
[PULL 10/15] target/sh4: Drop use of gdb_get_float32() and ldfl_p() |
Date: |
Mon, 15 Feb 2021 09:42:39 +0000 |
From: Peter Maydell <peter.maydell@linaro.org>
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_float32()
function to write a float32 value to the GDB protocol buffer; we can
just use gdb_get_reg32().
Similarly, for reading a value out of the GDB buffer into a float32
we can use ldl_p() and need not use ldfl_p().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210208113428.7181-2-peter.maydell@linaro.org>
Message-Id: <20210211122750.22645-11-alex.bennee@linaro.org>
diff --git a/target/sh4/gdbstub.c b/target/sh4/gdbstub.c
index 34ad3ca050..3488f68e32 100644
--- a/target/sh4/gdbstub.c
+++ b/target/sh4/gdbstub.c
@@ -58,9 +58,9 @@ int superh_cpu_gdb_read_register(CPUState *cs, GByteArray
*mem_buf, int n)
return gdb_get_regl(mem_buf, env->fpscr);
case 25 ... 40:
if (env->fpscr & FPSCR_FR) {
- return gdb_get_float32(mem_buf, env->fregs[n - 9]);
+ return gdb_get_reg32(mem_buf, env->fregs[n - 9]);
}
- return gdb_get_float32(mem_buf, env->fregs[n - 25]);
+ return gdb_get_reg32(mem_buf, env->fregs[n - 25]);
case 41:
return gdb_get_regl(mem_buf, env->ssr);
case 42:
@@ -119,9 +119,9 @@ int superh_cpu_gdb_write_register(CPUState *cs, uint8_t
*mem_buf, int n)
break;
case 25 ... 40:
if (env->fpscr & FPSCR_FR) {
- env->fregs[n - 9] = ldfl_p(mem_buf);
+ env->fregs[n - 9] = ldl_p(mem_buf);
} else {
- env->fregs[n - 25] = ldfl_p(mem_buf);
+ env->fregs[n - 25] = ldl_p(mem_buf);
}
break;
case 41:
--
2.20.1
- [PULL 02/15] travis.yml: Move the -fsanitize=undefined test to the gitlab-CI, (continued)
- [PULL 02/15] travis.yml: Move the -fsanitize=undefined test to the gitlab-CI, Alex Bennée, 2021/02/15
- [PULL 04/15] travis.yml: (Re-)move the --enable-debug jobs, Alex Bennée, 2021/02/15
- [PULL 05/15] travis.yml: Move the -fsanitize=thread testing to the gitlab-CI, Alex Bennée, 2021/02/15
- [PULL 08/15] tests/docker: remove travis container, Alex Bennée, 2021/02/15
- [PULL 11/15] target/m68k: Drop use of gdb_get_float64() and ldfq_p(), Alex Bennée, 2021/02/15
- [PULL 09/15] MAINTAINERS: Add gdbstub.h to the "GDB stub" section, Alex Bennée, 2021/02/15
- [PULL 06/15] .shippable: remove the last bits, Alex Bennée, 2021/02/15
- [PULL 07/15] travis-ci: Disable C++ optional objects on AArch64 container, Alex Bennée, 2021/02/15
- [PULL 12/15] target/ppc: Drop use of gdb_get_float64() and ldfq_p(), Alex Bennée, 2021/02/15
- [PULL 15/15] tests/tcg: fix silent skipping of softmmu gdb tests, Alex Bennée, 2021/02/15
- [PULL 10/15] target/sh4: Drop use of gdb_get_float32() and ldfl_p(),
Alex Bennée <=
- [PULL 14/15] bswap.h: Remove unused float-access functions, Alex Bennée, 2021/02/15
- [PULL 13/15] gdbstub: Remove unused gdb_get_float32() and gdb_get_float64(), Alex Bennée, 2021/02/15
- Re: [PULL 00/15] testing and gdbstub updates, Peter Maydell, 2021/02/15