[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/28] gdbstub: add helper for 128 bit registers
From: |
Alex Bennée |
Subject: |
[PULL 10/28] gdbstub: add helper for 128 bit registers |
Date: |
Tue, 17 Mar 2020 17:50:35 +0000 |
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
index 08363969c14..59e366ba3af 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
- [PULL 00/28 for 5.0] testing and gdbstub updates, Alex Bennée, 2020/03/17
- [PULL 02/28] tests/docker: Update VirGL git repository URL, Alex Bennée, 2020/03/17
- [PULL 05/28] travis.yml: Set G_MESSAGES_DEBUG do report GLib errors, Alex Bennée, 2020/03/17
- [PULL 01/28] tests/docker: Install tools to cross-debug and build Linux kernels, Alex Bennée, 2020/03/17
- [PULL 04/28] tests/docker: Update VirGL to v0.8.0, Alex Bennée, 2020/03/17
- [PULL 03/28] tests/docker: Remove obsolete VirGL --with-glx configure option, Alex Bennée, 2020/03/17
- [PULL 08/28] gdbstub: move str_buf to GDBState and use GString, Alex Bennée, 2020/03/17
- [PULL 09/28] gdbstub: move mem_buf to GDBState and use GByteArray, Alex Bennée, 2020/03/17
- [PULL 10/28] gdbstub: add helper for 128 bit registers,
Alex Bennée <=
- [PULL 06/28] gdbstub: make GDBState static and have common init function, Alex Bennée, 2020/03/17
- [PULL 11/28] target/arm: use gdb_get_reg helpers, Alex Bennée, 2020/03/17
- [PULL 12/28] target/m68k: use gdb_get_reg helpers, Alex Bennée, 2020/03/17
- [PULL 15/28] target/arm: prepare for multiple dynamic XMLs, Alex Bennée, 2020/03/17
- [PULL 25/28] tests/tcg/aarch64: add test-sve-ioctl guest-debug test, Alex Bennée, 2020/03/17
- [PULL 16/28] target/arm: explicitly encode regnum in our XML, Alex Bennée, 2020/03/17
- [PULL 13/28] target/i386: use gdb_get_reg helpers, Alex Bennée, 2020/03/17
- [PULL 07/28] gdbstub: stop passing GDBState * around and use global, Alex Bennée, 2020/03/17
- [PULL 14/28] gdbstub: extend GByteArray to read register helpers, Alex Bennée, 2020/03/17
- [PULL 23/28] tests/tcg/aarch64: add a gdbstub testcase for SVE registers, Alex Bennée, 2020/03/17