diff options
author | Alex Bennée | 2020-03-16 18:21:37 +0100 |
---|---|---|
committer | Alex Bennée | 2020-03-17 18:38:38 +0100 |
commit | 532cc1fb44823d2df55eebde2501e95cf83b4b9a (patch) | |
tree | 1d3305aa7843d003f3584f8ddcf9b701f8b7c9c4 /include/exec | |
parent | gdbstub: move mem_buf to GDBState and use GByteArray (diff) | |
download | qemu-532cc1fb44823d2df55eebde2501e95cf83b4b9a.tar.gz qemu-532cc1fb44823d2df55eebde2501e95cf83b4b9a.tar.xz qemu-532cc1fb44823d2df55eebde2501e95cf83b4b9a.zip |
gdbstub: add helper for 128 bit registers
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200316172155.971-11-alex.bennee@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r-- | include/exec/gdbstub.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 08363969c1..59e366ba3a 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -102,6 +102,19 @@ static inline int gdb_get_reg64(uint8_t *mem_buf, uint64_t val) return 8; } +static inline int gdb_get_reg128(uint8_t *mem_buf, uint64_t val_hi, + uint64_t val_lo) +{ +#ifdef TARGET_WORDS_BIGENDIAN + stq_p(mem_buf, val_hi); + stq_p(mem_buf + 8, val_lo); +#else + stq_p(mem_buf, val_lo); + stq_p(mem_buf + 8, val_hi); +#endif + return 16; +} + #if TARGET_LONG_BITS == 64 #define gdb_get_regl(buf, val) gdb_get_reg64(buf, val) #define ldtul_p(addr) ldq_p(addr) |