mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
gdbstub: Introduce gdb_get_float64() to get 64-bit float registers
When converted to use GByteArray in commits462474d760
anda010bdbe71
, 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:462474d760
("target/m68k: use gdb_get_reg helpers") Fixes:a010bdbe71
("extend GByteArray to read register helpers") Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200414163853.12164-3-philmd@redhat.com> Message-Id: <20200430190122.4592-3-alex.bennee@linaro.org>
This commit is contained in:
parent
f2385398b2
commit
38c1c09839
4 changed files with 16 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
static inline int gdb_get_zeroes(GByteArray *array, size_t len)
|
||||
{
|
||||
guint oldlen = array->len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue