Skip to content
Snippets Groups Projects
Commit 532cc1fb authored by Alex Bennée's avatar Alex Bennée
Browse files

gdbstub: add helper for 128 bit registers


Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Message-Id: <20200316172155.971-11-alex.bennee@linaro.org>
parent 4a25f1b9
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment