From: Nick Clifton Date: Mon, 23 Sep 2024 11:27:29 +0000 (+0100) Subject: Fix compile time error introduced by d774bf9b3623239a1cfa729afcf048a15da657d3 for... X-Git-Tag: gdb-16-branchpoint~853 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9923d668942ff29ce25fc4db460d0e0c4bbae1aa;p=thirdparty%2Fbinutils-gdb.git Fix compile time error introduced by d774bf9b3623239a1cfa729afcf048a15da657d3 for non-ELF x86 targets --- diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 864a38a9a20..de15872b5bd 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;