diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/reloc64.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/reloc64.s | 6 |
4 files changed, 21 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index d871aa3..fbe7896 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,14 @@ 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 code also setting fake_zero_displacement. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index e22e74c..4b602d4 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -6566,7 +6566,7 @@ build_modrm_byte (void) 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; @@ -6636,7 +6636,7 @@ build_modrm_byte (void) 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; diff --git a/gas/testsuite/gas/i386/reloc64.d b/gas/testsuite/gas/i386/reloc64.d index ea7f696..a7fd3d6 100644 --- a/gas/testsuite/gas/i386/reloc64.d +++ b/gas/testsuite/gas/i386/reloc64.d @@ -51,6 +51,10 @@ Disassembly of section \.text: .*[ ]+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 diff --git a/gas/testsuite/gas/i386/reloc64.s b/gas/testsuite/gas/i386/reloc64.s index ecaaef5..0f9c51e 100644 --- a/gas/testsuite/gas/i386/reloc64.s +++ b/gas/testsuite/gas/i386/reloc64.s @@ -218,3 +218,9 @@ bad call xtrn@gotplt 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 |