]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix compile time error introduced by d774bf9b3623239a1cfa729afcf048a15da657d3 for...
authorNick Clifton <nickc@redhat.com>
Mon, 23 Sep 2024 11:27:29 +0000 (12:27 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 23 Sep 2024 11:27:29 +0000 (12:27 +0100)
gas/config/tc-i386.c

index 864a38a9a208415da34fb766a817ef13a66a0d95..de15872b5bd02d16da6cfd9314501312dbcd5baa 100644 (file)
@@ -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;