+2017-11-23 Jan Beulich <jbeulich@suse.com>
+
+ PR gas/22441
+ * config/tc-i386.c (build_modrm_byte): Add address override
+ prefix checks alongside 64-bit mode ones.
+ * testsuite/gas/i386/reloc64.s: Add 32-bit signed/unsigned
+ relocation cases.
+ * testsuite/gas/i386/reloc64.d: Adjust expectations.
+
2017-11-23 Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (build_modrm_byte): Drop VSIB handling from
i.types[op].bitfield.disp8 = 0;
i.types[op].bitfield.disp16 = 0;
i.types[op].bitfield.disp64 = 0;
- if (flag_code != CODE_64BIT)
+ if (flag_code != CODE_64BIT || i.prefix[ADDR_PREFIX])
{
/* Must be 32 bit */
i.types[op].bitfield.disp32 = 1;
i.types[op].bitfield.disp8 = 0;
i.types[op].bitfield.disp16 = 0;
i.types[op].bitfield.disp64 = 0;
- if (flag_code != CODE_64BIT)
+ if (flag_code != CODE_64BIT || i.prefix[ADDR_PREFIX])
{
/* Must be 32 bit */
i.types[op].bitfield.disp32 = 1;
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
.*[ ]+R_X86_64_GOTPLT64[ ]+xtrn
+.*[ ]+R_X86_64_32S[ ]+xtrn
+.*[ ]+R_X86_64_32[ ]+xtrn
+.*[ ]+R_X86_64_32S[ ]+xtrn
+.*[ ]+R_X86_64_32[ ]+xtrn
Disassembly of section \.data:
#...
.*[ ]+R_X86_64_64[ ]+xtrn
bad .long xtrn@gotplt
bad .word xtrn@gotplt
bad .byte xtrn@gotplt
+
+ .text
+ mov xtrn(,%rbx), %eax
+ mov xtrn(,%ebx), %eax
+ vgatherdps %xmm2, xtrn(,%xmm1), %xmm0
+ addr32 vgatherdps %xmm2, xtrn(,%xmm1), %xmm0
+2017-11-23 Jan Beulich <jbeulich@suse.com>
+
+ PR gas/22441
+ * testsuite/ld-x86-64/apic.{s,d}: New.
+ * testsuite/ld-x86-64/x86-64.exp: Run new test.
+
2017-11-21 Nick Clifton <nickc@redhat.com>
PR 22419
--- /dev/null
+#name: 32-bit relocs w/ index but no base
+#ld: --defsym APIC_BASE=0xfee00000
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section \.text:
+
+#...
+[0-9a-f]+[ ]+<apic_read>:
+[ ]*[0-9a-f]+:[ ]+67 8b 04 bd 00 00 e0 fe[ ]+mov[ ]+(0xfee|-0x12)00000\(,%edi,4\),%eax
+[ ]*[0-9a-f]+:[ ]+c3[ ]+retq?[ ]*
+#...
+[0-9a-f]+[ ]+<apic_write>:
+[ ]*[0-9a-f]+:[ ]+67 89 34 bd 00 00 e0 fe[ ]+mov[ ]+%esi,(0xfee|-0x12)00000\(,%edi,4\)
+[ ]*[0-9a-f]+:[ ]+c3[ ]+retq?[ ]*
+#pass
--- /dev/null
+ .text
+ .intel_syntax noprefix
+ .global _start
+_start:
+ ret
+
+apic_read:
+ mov eax, [edi*4+APIC_BASE]
+ ret
+
+apic_write:
+ mov [edi*4+APIC_BASE], esi
+ ret
run_dump_test "abs"
run_dump_test "abs-l1om"
+run_dump_test "apic"
run_dump_test "pcrel8"
run_dump_test "pcrel16"
run_dump_test "tlsgd2"