aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-04-29 15:02:25 +0200
committerJan Beulich <jbeulich@suse.com>2021-04-29 15:02:25 +0200
commita2443c8988a443e802fced3c03dd55b563629afd (patch)
tree7c77298b267b10e297744630b1932546f4fc6379
parent5edb8e3f5ad8d74a83fc0df7f6e4514eed0aa77f (diff)
downloadgdb-a2443c8988a443e802fced3c03dd55b563629afd.zip
gdb-a2443c8988a443e802fced3c03dd55b563629afd.tar.gz
gdb-a2443c8988a443e802fced3c03dd55b563629afd.tar.bz2
x86-64: adjust recently added tests
Five of them fail for Cygwin and MingW. Adjust four and move one to the ELF-only section.
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/testsuite/gas/i386/i386.exp3
-rw-r--r--gas/testsuite/gas/i386/lea64-optimize.d14
-rw-r--r--gas/testsuite/gas/i386/lea64.d14
-rw-r--r--gas/testsuite/gas/i386/x86-64-rip-inval-1.s1
-rw-r--r--gas/testsuite/gas/i386/x86-64-rip-inval-2.s1
6 files changed, 26 insertions, 15 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a44b880..7459117 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,13 @@
2021-04-29 Jan Beulich <jbeulich@suse.com>
+ * 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 <jbeulich@suse.com>
+
* config/tc-i386.c (i386_validate_fix): Change return type to
int. Short-circuit BFD_RELOC_SIZE* handling.
(tc_gen_reloc): New local variable sym. Extend logic when
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index ae01c89..234438e 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 301805a..9d1c27d 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[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 00 00[ ]+lea[ ]+0x0,%ax[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym
+[ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+mov[ ]+\$0x0,%eax[ ]+[0-9a-f]+: (R_X86_64_32|IMAGE_REL_AMD64_ADDR32)[ ]+sym
+[ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+mov[ ]+\$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]+:[ ]+48 c7 c0 00 00 00 00[ ]+mov[ ]+\$0x0,%rax
[ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+mov[ ]+\$0x0,%eax
[ ]*[0-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 80136ff..e5b3f06 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 a0e783e..7af9a32 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 9bdc703..2391b44 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