[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 11/15] target/m68k: Drop use of gdb_get_float64() and ldfq_p()
From: |
Alex Bennée |
Subject: |
[PATCH v1 11/15] target/m68k: Drop use of gdb_get_float64() and ldfq_p() |
Date: |
Thu, 11 Feb 2021 12:27:46 +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_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 <peter.maydell@linaro.org>
Acked-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210208113428.7181-3-peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
target/m68k/helper.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/target/m68k/helper.c b/target/m68k/helper.c
index 3ff5765795..09f0391d50 100644
--- a/target/m68k/helper.c
+++ b/target/m68k/helper.c
@@ -72,8 +72,7 @@ static int cf_fpu_gdb_get_reg(CPUM68KState *env, GByteArray
*mem_buf, int n)
{
if (n < 8) {
float_status s;
- return gdb_get_float64(mem_buf,
- floatx80_to_float64(env->fregs[n].d, &s));
+ return gdb_get_reg64(mem_buf, floatx80_to_float64(env->fregs[n].d,
&s));
}
switch (n) {
case 8: /* fpcontrol */
@@ -90,7 +89,7 @@ static int cf_fpu_gdb_set_reg(CPUM68KState *env, uint8_t
*mem_buf, int n)
{
if (n < 8) {
float_status s;
- env->fregs[n].d = float64_to_floatx80(ldfq_p(mem_buf), &s);
+ env->fregs[n].d = float64_to_floatx80(ldq_p(mem_buf), &s);
return 8;
}
switch (n) {
--
2.20.1
- [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float), Alex Bennée, 2021/02/11
- [PATCH v1 01/15] travis.yml: Move gprof/gcov test across to gitlab, Alex Bennée, 2021/02/11
- [PATCH v1 02/15] travis.yml: Move the -fsanitize=undefined test to the gitlab-CI, Alex Bennée, 2021/02/11
- [PATCH v1 03/15] travis.yml: Move the --enable-modules test to the gitlab-CI, Alex Bennée, 2021/02/11
- [PATCH v1 04/15] travis.yml: (Re-)move the --enable-debug jobs, Alex Bennée, 2021/02/11
- [PATCH v1 06/15] .shippable: remove the last bits, Alex Bennée, 2021/02/11
- [PATCH v1 05/15] travis.yml: Move the -fsanitize=thread testing to the gitlab-CI, Alex Bennée, 2021/02/11
- [PATCH v1 07/15] travis-ci: Disable C++ optional objects on AArch64 container, Alex Bennée, 2021/02/11
- [PATCH v1 08/15] tests/docker: remove travis container, Alex Bennée, 2021/02/11
- [PATCH v1 11/15] target/m68k: Drop use of gdb_get_float64() and ldfq_p(),
Alex Bennée <=
- [PATCH v1 10/15] target/sh4: Drop use of gdb_get_float32() and ldfl_p(), Alex Bennée, 2021/02/11
- [PATCH v1 14/15] bswap.h: Remove unused float-access functions, Alex Bennée, 2021/02/11
- [PATCH v1 13/15] gdbstub: Remove unused gdb_get_float32() and gdb_get_float64(), Alex Bennée, 2021/02/11
- [PATCH v1 09/15] MAINTAINERS: Add gdbstub.h to the "GDB stub" section, Alex Bennée, 2021/02/11
- [PATCH v1 15/15] tests/tcg: fix silent skipping of softmmu gdb tests, Alex Bennée, 2021/02/11
- [PATCH v1 12/15] target/ppc: Drop use of gdb_get_float64() and ldfq_p(), Alex Bennée, 2021/02/11