From: Jan Beulich Date: Thu, 29 Apr 2021 13:02:25 +0000 (+0200) Subject: x86-64: adjust recently added tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a2443c8988a443e802fced3c03dd55b563629afd;p=binutils-gdb.git x86-64: adjust recently added tests Five of them fail for Cygwin and MingW. Adjust four and move one to the ELF-only section. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index a44b8804239..74591175547 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2021-04-29 Jan Beulich + + * testsuite/gas/i386/i386.exp: Move x86-64-rip-2 invocation. + * testsuite/gas/i386/lea64.d, + testsuite/gas/i386/lea64-optimize.d: Allow for COFF relocs. + * testsuite/gas/i386/x86-64-rip-inval-1.s, + testsuite/gas/i386/x86-64-rip-inval-2.s. Add .end. + 2021-04-29 Jan Beulich * config/tc-i386.c (i386_validate_fix): Change return type to diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index ae01c8996d8..234438e5d85 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -765,7 +765,6 @@ if [gas_64_check] then { run_list_test "pcrel64" "-al" run_dump_test "x86-64-rip" run_dump_test "x86-64-rip-intel" - run_dump_test "x86-64-rip-2" run_list_test "x86-64-rip-inval-1" "-al" run_list_test "x86-64-rip-inval-2" "-al" run_dump_test "x86-64-stack" @@ -1278,6 +1277,8 @@ if [gas_64_check] then { run_list_test "x86-64-branch-4" "-al -mintel64" run_list_test "x86-64-branch-5" "-al" + run_dump_test "x86-64-rip-2" + run_dump_test "x86-64-gotpcrel" run_dump_test "x86-64-gotpcrel-no-relax" run_dump_test "x86-64-gotpcrel-2" diff --git a/gas/testsuite/gas/i386/lea64-optimize.d b/gas/testsuite/gas/i386/lea64-optimize.d index 301805a53e6..9d1c27da608 100644 --- a/gas/testsuite/gas/i386/lea64-optimize.d +++ b/gas/testsuite/gas/i386/lea64-optimize.d @@ -11,8 +11,8 @@ Disassembly of section .text: [ ]*[0-9a-f]+:[ ]+8d 04 08[ ]+lea[ ]+\(%rax,%rcx(,1)?\),%eax [ ]*[0-9a-f]+:[ ]+8d 04 08[ ]+lea[ ]+\(%rax,%rcx(,1)?\),%eax [ ]*[0-9a-f]+:[ ]+8d 48 01[ ]+lea[ ]+0x1\(%rax\),%ecx -[ ]*[0-9a-f]+:[ ]+8d 88 00 00 00 00[ ]+lea[ ]+0x0\(%rax\),%ecx[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym -[ ]*[0-9a-f]+:[ ]+8d 0c 25 00 00 00 00[ ]+lea[ ]+0x0,%ecx[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym +[ ]*[0-9a-f]+:[ ]+8d 88 00 00 00 00[ ]+lea[ ]+0x0\(%rax\),%ecx[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym +[ ]*[0-9a-f]+:[ ]+8d 0c 25 00 00 00 00[ ]+lea[ ]+0x0,%ecx[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym [ ]*[0-9a-f]+:[ ]+8d 04 00[ ]+lea[ ]+\(%rax,%rax(,1)?\),%eax [ ]*[0-9a-f]+:[ ]+8d 04 45 00 00 00 00[ ]+lea[ ]+0x0\(,%rax,2\),%eax [ ]*[0-9a-f]+:[ ]+8d 05 00 00 00 00[ ]+lea[ ]+0x0\(%rip\),%eax($| *#.*) @@ -60,11 +60,11 @@ Disassembly of section .text: [ ]*[0-9a-f]+:[ ]+b8 fe ff ff ff[ ]+mov[ ]+\$0xfffffffe,%eax [ ]*[0-9a-f]+:[ ]+66 b8 fd ff[ ]+mov[ ]+\$0xfffd,%ax [ ]*[0-9a-f]+:[ ]+48 c7 c0 00 00 00 00[ ]+mov[ ]+\$0x0,%rax[ ]+[0-9a-f]+: R_X86_64_32S[ ]+sym -[ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+m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9a-f]+:[ ]+66 b8 00 00[ ]+mov[ ]+\$0x0,%ax diff --git a/gas/testsuite/gas/i386/lea64.d b/gas/testsuite/gas/i386/lea64.d index 80136ffe6e3..e5b3f0647f7 100644 --- a/gas/testsuite/gas/i386/lea64.d +++ b/gas/testsuite/gas/i386/lea64.d @@ -10,8 +10,8 @@ Disassembly of section .text: [ ]*[0-9a-f]+:[ ]+64 8d 04 08[ ]+lea[ ]+%fs:\(%rax,%rcx(,1)?\),%eax [ ]*[0-9a-f]+:[ ]+65 8d 04 08[ ]+lea[ ]+%gs:\(%rax,%rcx(,1)?\),%eax [ ]*[0-9a-f]+:[ ]+8d 48 01[ ]+lea[ ]+0x1\(%rax\),%ecx -[ ]*[0-9a-f]+:[ ]+8d 88 00 00 00 00[ ]+lea[ ]+0x0\(%rax\),%ecx[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym -[ ]*[0-9a-f]+:[ ]+8d 0c 25 00 00 00 00[ ]+lea[ ]+0x0,%ecx[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym +[ ]*[0-9a-f]+:[ ]+8d 88 00 00 00 00[ ]+lea[ ]+0x0\(%rax\),%ecx[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym +[ ]*[0-9a-f]+:[ ]+8d 0c 25 00 00 00 00[ ]+lea[ ]+0x0,%ecx[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym [ ]*[0-9a-f]+:[ ]+8d 04 00[ ]+lea[ ]+\(%rax,%rax(,1)?\),%eax [ ]*[0-9a-f]+:[ ]+8d 04 45 00 00 00 00[ ]+lea[ ]+0x0\(,%rax,2\),%eax [ ]*[0-9a-f]+:[ ]+8d 05 00 00 00 00[ ]+lea[ ]+0x0\(%rip\),%eax($| *#.*) @@ -59,11 +59,11 @@ Disassembly of section .text: [ ]*[0-9a-f]+:[ ]+67 8d 04 25 fe ff ff ff[ ]+lea[ ]+0xfffffffe\(,%eiz,1\),%eax [ ]*[0-9a-f]+:[ ]+67 66 8d 04 25 fd ff ff ff[ ]+lea[ ]+0xfffffffd\(,%eiz,1\),%ax [ ]*[0-9a-f]+:[ ]+48 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%rax[ ]+[0-9a-f]+: R_X86_64_32S[ ]+sym -[ ]*[0-9a-f]+:[ ]+8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%eax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym -[ ]*[0-9a-f]+:[ ]+66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%ax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym -[ ]*[0-9a-f]+:[ ]+67 48 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0\(,%eiz,1\),%rax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym -[ ]*[0-9a-f]+:[ ]+67 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0\(,%eiz,1\),%eax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym -[ ]*[0-9a-f]+:[ ]+67 66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0\(,%eiz,1\),%ax[ ]+[0-9a-f]+: R_X86_64_32[ ]+sym +[ ]*[0-9a-f]+:[ ]+8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%eax[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym +[ ]*[0-9a-f]+:[ ]+66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%ax[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym +[ ]*[0-9a-f]+:[ ]+67 48 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0\(,%eiz,1\),%rax[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym +[ ]*[0-9a-f]+:[ ]+67 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0\(,%eiz,1\),%eax[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym +[ ]*[0-9a-f]+:[ ]+67 66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0\(,%eiz,1\),%ax[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym [ ]*[0-9a-f]+:[ ]+48 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%rax [ ]*[0-9a-f]+:[ ]+8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%eax [ ]*[0-9a-f]+:[ ]+66 8d 04 25 00 00 00 00[ ]+lea[ ]+0x0,%ax diff --git a/gas/testsuite/gas/i386/x86-64-rip-inval-1.s b/gas/testsuite/gas/i386/x86-64-rip-inval-1.s index a0e783e59ed..7af9a32a89b 100644 --- a/gas/testsuite/gas/i386/x86-64-rip-inval-1.s +++ b/gas/testsuite/gas/i386/x86-64-rip-inval-1.s @@ -2,3 +2,4 @@ _start: movq test1(%rip), %rax .set test1, . - 0x80000001 + .end diff --git a/gas/testsuite/gas/i386/x86-64-rip-inval-2.s b/gas/testsuite/gas/i386/x86-64-rip-inval-2.s index 9bdc703cf22..2391b44d47a 100644 --- a/gas/testsuite/gas/i386/x86-64-rip-inval-2.s +++ b/gas/testsuite/gas/i386/x86-64-rip-inval-2.s @@ -2,3 +2,4 @@ _start: movq test1(%rip), %rax .set test1, . + 0x80000000 + .end