On 4/30/20 12:01 PM, Alex Bennée wrote: > From: Philippe Mathieu-Daudé <phi...@redhat.com> > > When converted to use GByteArray in commits 462474d760c and > a010bdbe719, the call to stfq_p() was removed. This call > serialize a float. > Since we now use a GByteArray, we can not use stfq_p() directly. > Introduce the gdb_get_float64() helper to load a float64 register. > > Fixes: 462474d760c ("target/m68k: use gdb_get_reg helpers") > Fixes: a010bdbe719 ("extend GByteArray to read register helpers") > Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> > Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > Message-Id: <20200414163853.12164-3-phi...@redhat.com> > --- > include/exec/gdbstub.h | 11 +++++++++++ > target/m68k/helper.c | 3 ++- > target/ppc/gdbstub.c | 4 ++-- > target/ppc/translate_init.inc.c | 2 +- > 4 files changed, 16 insertions(+), 4 deletions(-) > > diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h > index 20e1072692..4a2b8e3089 100644 > --- a/include/exec/gdbstub.h > +++ b/include/exec/gdbstub.h > @@ -134,6 +134,17 @@ static inline int gdb_get_float32(GByteArray *array, > float32 val) > > return sizeof(buf); > } > + > +static inline int gdb_get_float64(GByteArray *array, float64 val) > +{ > + uint8_t buf[sizeof(CPU_DoubleU)]; > + > + stfq_p(buf, val); > + g_byte_array_append(array, buf, sizeof(buf)); > + > + return sizeof(buf); > +}
I think we'd be better off *removing* ldfl_p/ldfq_p/stfl_p/stfq_p and everything that specializes on them, like this. r~