Directly checking TARGET_LONG_BITS allows to remove GDB_FORCE_64.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
target/i386/gdbstub.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c
index be41601cffc..291d56b8e13 100644
--- a/target/i386/gdbstub.c
+++ b/target/i386/gdbstub.c
@@ -79,15 +79,9 @@ static const int gpr_map32[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
#define IDX_CTL_CR8_REG (IDX_CTL_REGS + 4)
#define IDX_CTL_EFER_REG (IDX_CTL_REGS + 5)
-#ifdef TARGET_X86_64
-#define GDB_FORCE_64 1
-#else
-#define GDB_FORCE_64 0
-#endif
-
static int gdb_read_reg_cs64(uint32_t hflags, GByteArray *buf, target_ulong
val)
{
- if ((hflags & HF_CS64_MASK) || GDB_FORCE_64) {
+ if ((hflags & HF_CS64_MASK) || TARGET_LONG_BITS == 64) {
return gdb_get_reg64(buf, val);
}
return gdb_get_reg32(buf, val);
--
2.52.0