diff options
author | Jan Beulich <jbeulich@suse.com> | 2023-04-21 12:10:23 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2023-04-21 12:10:23 +0200 |
commit | 32c8e7265a55ab4cf14fa255115a81134c62fb16 (patch) | |
tree | e094e159d04ba9294aee2e55fa4631ef27fb4f3d /opcodes | |
parent | d82c06b68e32d01d59b664fe32496184db19b251 (diff) | |
download | gdb-32c8e7265a55ab4cf14fa255115a81134c62fb16.zip gdb-32c8e7265a55ab4cf14fa255115a81134c62fb16.tar.gz gdb-32c8e7265a55ab4cf14fa255115a81134c62fb16.tar.bz2 |
x86: drop (explicit) BFD64 dependency from disassembler
get64() is unreachable when !BFD64 (due to a check relatively early in
print_insn()). Let's avoid the associated #ifdef-ary (or else we should
extend it to remove more dead code).
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/i386-dis.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index d6bff51..46ba01f 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -12361,9 +12361,8 @@ OP_G (instr_info *ins, int bytemode, int sizeflag) return true; } -#ifdef BFD64 static bool -get64 (instr_info *ins, bfd_vma *res) +get64 (instr_info *ins, uint64_t *res) { unsigned int a; unsigned int b; @@ -12378,17 +12377,9 @@ get64 (instr_info *ins, bfd_vma *res) b |= (*ins->codep++ & 0xff) << 8; b |= (*ins->codep++ & 0xff) << 16; b |= (*ins->codep++ & 0xffu) << 24; - *res = a + ((bfd_vma) b << 32); + *res = a + ((uint64_t) b << 32); return true; } -#else -static bool -get64 (instr_info *ins ATTRIBUTE_UNUSED, bfd_vma *res ATTRIBUTE_UNUSED) -{ - abort (); - return false; -} -#endif static bool get32 (instr_info *ins, bfd_signed_vma *res) @@ -12603,7 +12594,7 @@ OP_I (instr_info *ins, int bytemode, int sizeflag) static bool OP_I64 (instr_info *ins, int bytemode, int sizeflag) { - bfd_vma op; + uint64_t op; if (bytemode != v_mode || ins->address_mode != mode_64bit || !(ins->rex & REX_W)) @@ -12817,7 +12808,7 @@ OP_OFF (instr_info *ins, int bytemode, int sizeflag) static bool OP_OFF64 (instr_info *ins, int bytemode, int sizeflag) { - bfd_vma off; + uint64_t off; if (ins->address_mode != mode_64bit || (ins->prefixes & PREFIX_ADDR)) |