diff options
author | Nick Clifton <nickc@redhat.com> | 2024-09-23 12:27:29 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2024-09-23 12:27:29 +0100 |
commit | 9923d668942ff29ce25fc4db460d0e0c4bbae1aa (patch) | |
tree | 5657d27e0c74f77c65b8ed3b7e0a39064d897933 | |
parent | dca18cb6a100fa87d6478a465e48ddc1d9ed943a (diff) | |
download | fsf-binutils-gdb-9923d668942ff29ce25fc4db460d0e0c4bbae1aa.zip fsf-binutils-gdb-9923d668942ff29ce25fc4db460d0e0c4bbae1aa.tar.gz fsf-binutils-gdb-9923d668942ff29ce25fc4db460d0e0c4bbae1aa.tar.bz2 |
Fix compile time error introduced by d774bf9b3623239a1cfa729afcf048a15da657d3 for non-ELF x86 targets
-rw-r--r-- | gas/config/tc-i386.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 864a38a..de15872 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -6487,12 +6487,15 @@ x86_check_tls_relocation (enum bfd_reloc_code_real r_type) if (i.base_reg->reg_num != RegIP || !i.base_reg->reg_type.bitfield.qword) return x86_tls_error_rip; +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) if (x86_elf_abi == X86_64_ABI) { if (!i.op[1].regs->reg_type.bitfield.qword) return x86_tls_error_dest_64bit_reg_size; } - else if (!i.op[1].regs->reg_type.bitfield.dword + else +#endif + if (!i.op[1].regs->reg_type.bitfield.dword && !i.op[1].regs->reg_type.bitfield.qword) return x86_tls_error_dest_32bit_or_64bit_reg_size; break; @@ -6594,12 +6597,15 @@ x86_check_tls_relocation (enum bfd_reloc_code_real r_type) if (i.base_reg->reg_num != RegIP || !i.base_reg->reg_type.bitfield.qword) return x86_tls_error_rip; +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) if (x86_elf_abi == X86_64_ABI) { if (!i.op[i.operands - 1].regs->reg_type.bitfield.qword) return x86_tls_error_dest_64bit_reg_size; } - else if (!i.op[i.operands - 1].regs->reg_type.bitfield.dword + else +#endif + if (!i.op[i.operands - 1].regs->reg_type.bitfield.dword && !i.op[i.operands - 1].regs->reg_type.bitfield.qword) return x86_tls_error_dest_32bit_or_64bit_reg_size; break; |