[PATCH 0/5] Drop float32/float64 accessors used by gdbstub code

Peter Maydell posted 5 patches 3 years, 2 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210208113428.7181-1-peter.maydell@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, Laurent Vivier <laurent@vivier.eu>, David Gibson <david@gibson.dropbear.id.au>, Paolo Bonzini <pbonzini@redhat.com>, Greg Kurz <groug@kaod.org>
docs/devel/loads-stores.rst     | 14 +++-----
include/exec/cpu-all.h          |  8 -----
include/exec/gdbstub.h          | 20 -----------
include/qemu/bswap.h            | 60 ---------------------------------
target/m68k/helper.c            |  5 ++-
target/ppc/gdbstub.c            |  8 ++---
target/sh4/gdbstub.c            |  8 ++---
target/ppc/translate_init.c.inc |  4 +--
8 files changed, 17 insertions(+), 110 deletions(-)
[PATCH 0/5] Drop float32/float64 accessors used by gdbstub code
Posted by Peter Maydell 3 years, 2 months ago
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 special gdb_get_float64() and
gdb_get_float32() functions to write float64 or float32 values to the
GDB protocol buffer; we can just use gdb_get_reg64() and
gdb_get_reg32().

Similarly, for reading a value out of the GDB buffer into a float64
or float32 we can use ldq_p() or ldl_p() and need not use ldfq_p()
or ldfl_p().

This patchseries drops the use of the gdb_get_float* and ldf*
functions from the three targets that were using them, and then
removes the now-unused functions from gdbstub.h and bswap.h.

thanks
-- PMM

Peter Maydell (5):
  target/sh4: Drop use of gdb_get_float32() and ldfl_p()
  target/m68k: Drop use of gdb_get_float64() and ldfq_p()
  target/ppc: Drop use of gdb_get_float64() and ldfq_p()
  gdbstub: Remove unused gdb_get_float32() and gdb_get_float64()
  bswap.h: Remove unused float-access functions

 docs/devel/loads-stores.rst     | 14 +++-----
 include/exec/cpu-all.h          |  8 -----
 include/exec/gdbstub.h          | 20 -----------
 include/qemu/bswap.h            | 60 ---------------------------------
 target/m68k/helper.c            |  5 ++-
 target/ppc/gdbstub.c            |  8 ++---
 target/sh4/gdbstub.c            |  8 ++---
 target/ppc/translate_init.c.inc |  4 +--
 8 files changed, 17 insertions(+), 110 deletions(-)

-- 
2.20.1


Re: [PATCH 0/5] Drop float32/float64 accessors used by gdbstub code
Posted by Alex Bennée 3 years, 2 months ago
Peter Maydell <peter.maydell@linaro.org> writes:

> 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 special gdb_get_float64() and
> gdb_get_float32() functions to write float64 or float32 values to the
> GDB protocol buffer; we can just use gdb_get_reg64() and
> gdb_get_reg32().
>
> Similarly, for reading a value out of the GDB buffer into a float64
> or float32 we can use ldq_p() or ldl_p() and need not use ldfq_p()
> or ldfl_p().
>
> This patchseries drops the use of the gdb_get_float* and ldf*
> functions from the three targets that were using them, and then
> removes the now-unused functions from gdbstub.h and bswap.h.

Queued to gdbstub/next, thanks.

-- 
Alex Bennée

Re: [PATCH 0/5] Drop float32/float64 accessors used by gdbstub code
Posted by Philippe Mathieu-Daudé 3 years, 2 months ago
On 2/8/21 12:34 PM, Peter Maydell wrote:
> 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 special gdb_get_float64() and
> gdb_get_float32() functions to write float64 or float32 values to the
> GDB protocol buffer; we can just use gdb_get_reg64() and
> gdb_get_reg32().
> 
> Similarly, for reading a value out of the GDB buffer into a float64
> or float32 we can use ldq_p() or ldl_p() and need not use ldfq_p()
> or ldfl_p().
> 
> This patchseries drops the use of the gdb_get_float* and ldf*
> functions from the three targets that were using them, and then
> removes the now-unused functions from gdbstub.h and bswap.h.
> 
> thanks
> -- PMM
> 
> Peter Maydell (5):
>   target/sh4: Drop use of gdb_get_float32() and ldfl_p()
>   target/m68k: Drop use of gdb_get_float64() and ldfq_p()
>   target/ppc: Drop use of gdb_get_float64() and ldfq_p()
>   gdbstub: Remove unused gdb_get_float32() and gdb_get_float64()
>   bswap.h: Remove unused float-access functions
> 
>  docs/devel/loads-stores.rst     | 14 +++-----
>  include/exec/cpu-all.h          |  8 -----
>  include/exec/gdbstub.h          | 20 -----------
>  include/qemu/bswap.h            | 60 ---------------------------------
>  target/m68k/helper.c            |  5 ++-
>  target/ppc/gdbstub.c            |  8 ++---
>  target/sh4/gdbstub.c            |  8 ++---
>  target/ppc/translate_init.c.inc |  4 +--
>  8 files changed, 17 insertions(+), 110 deletions(-)

Series:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Thanks for the cleanup!