[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 05/22] gdbstub: add helper for 128 bit registers
From: |
Alex Bennée |
Subject: |
[PATCH v5 05/22] gdbstub: add helper for 128 bit registers |
Date: |
Tue, 14 Jan 2020 15:09:36 +0000 |
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
---
v2
- take care of endianess of the whole 128 bit word
---
include/exec/gdbstub.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
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)
--
2.20.1
- [PATCH v5 00/22] gdbstub refactor and SVE support (+check-tcg tweaks), Alex Bennée, 2020/01/14
- [PATCH v5 01/22] gdbstub: make GDBState static and have common init function, Alex Bennée, 2020/01/14
- [PATCH v5 06/22] target/arm: use gdb_get_reg helpers, Alex Bennée, 2020/01/14
- [PATCH v5 03/22] gdbstub: move str_buf to GDBState and use GString, Alex Bennée, 2020/01/14
- [PATCH v5 07/22] target/m68k: use gdb_get_reg helpers, Alex Bennée, 2020/01/14
- [PATCH v5 09/22] target/arm: prepare for multiple dynamic XMLs, Alex Bennée, 2020/01/14
- [PATCH v5 05/22] gdbstub: add helper for 128 bit registers,
Alex Bennée <=
- [PATCH v5 04/22] gdbstub: move mem_buf to GDBState and use GByteArray, Alex Bennée, 2020/01/14
- [PATCH v5 14/22] target/arm: don't bother with id_aa64pfr0_read for USER_ONLY, Alex Bennée, 2020/01/14
- [PATCH v5 02/22] gdbstub: stop passing GDBState * around and use global, Alex Bennée, 2020/01/14
- [PATCH v5 11/22] target/arm: default SVE length to 64 bytes for linux-user, Alex Bennée, 2020/01/14
- [PATCH v5 12/22] target/arm: generate xml description of our SVE registers, Alex Bennée, 2020/01/14
- [PATCH v5 10/22] target/arm: explicitly encode regnum in our XML, Alex Bennée, 2020/01/14
- [PATCH v5 13/22] tests/tcg: add a configure compiler check for ARMv8.1 and SVE, Alex Bennée, 2020/01/14