aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/i386/i386.exp1
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-branch.d24
-rw-r--r--gas/testsuite/gas/i386/x86-64-branch-4.l33
-rw-r--r--gas/testsuite/gas/i386/x86-64-branch-4.s16
-rw-r--r--gas/testsuite/gas/i386/x86-64-branch.d24
5 files changed, 74 insertions, 24 deletions
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 959cd14..e7073e0 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -816,6 +816,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-jump"
run_dump_test "x86-64-branch-2"
run_list_test "x86-64-branch-3" "-al -mintel64"
+ run_list_test "x86-64-branch-4" "-al -mintel64"
run_dump_test "x86-64-gotpcrel"
run_dump_test "x86-64-gotpcrel-no-relax"
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
index 8200282..915dbf3 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
@@ -10,14 +10,14 @@ Disassembly of section .text:
0+ <.text>:
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: ff d0 callq \*%rax
-[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
-[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
-[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
+[ ]*[a-f0-9]+: 66 ff d0 data16 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff d0 data16 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff 10 data16 callq \*\(%rax\)
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
-[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
-[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
-[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
+[ ]*[a-f0-9]+: 66 ff e0 data16 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff e0 data16 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff 20 data16 jmpq \*\(%rax\)
[ ]*[a-f0-9]+: e8 00 00 00 00 callq 0x1f 1b: R_X86_64_PC32 \*ABS\*\+0x10003c
[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 0x24 20: R_X86_64_PC32 \*ABS\*\+0x10003c
[ ]*[a-f0-9]+: 66 e8 00 00 00 00 data16 callq 0x2a 26: R_X86_64_PC32 foo-0x4
@@ -25,14 +25,14 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 66 0f 82 00 00 00 00 data16 jb 0x37 33: R_X86_64_PC32 foo-0x4
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: ff d0 callq \*%rax
-[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
-[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
-[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
+[ ]*[a-f0-9]+: 66 ff d0 data16 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff d0 data16 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff 10 data16 callq \*\(%rax\)
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
-[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
-[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
-[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
+[ ]*[a-f0-9]+: 66 ff e0 data16 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff e0 data16 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff 20 data16 jmpq \*\(%rax\)
[ ]*[a-f0-9]+: e8 00 00 00 00 callq 0x56 52: R_X86_64_PC32 \*ABS\*\+0x10003c
[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 0x5b 57: R_X86_64_PC32 \*ABS\*\+0x10003c
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-branch-4.l b/gas/testsuite/gas/i386/x86-64-branch-4.l
new file mode 100644
index 0000000..db55394
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-branch-4.l
@@ -0,0 +1,33 @@
+.*: Assembler messages:
+.*:2: Error: invalid instruction suffix for `call'
+.*:3: Error: invalid instruction suffix for `call'
+.*:4: Error: operand type mismatch for `jmp'
+.*:5: Error: invalid instruction suffix for `jmp'
+.*:6: Error: invalid instruction suffix for `jmp'
+.*:9: Error: operand type mismatch for `call'
+.*:10: Error: invalid instruction suffix for `call'
+.*:11: Error: invalid instruction suffix for `call'
+.*:12: Error: invalid instruction suffix for `call'
+.*:13: Error: operand type mismatch for `jmp'
+.*:14: Error: invalid instruction suffix for `jmp'
+.*:15: Error: invalid instruction suffix for `jmp'
+.*:16: Error: invalid instruction suffix for `jmp'
+GAS LISTING .*
+#...
+[ ]*1[ ]+\.text
+[ ]*2[ ]+callw \*%ax
+[ ]*3[ ]+callw \*\(%rax\)
+[ ]*4[ ]+jmp \*%ax
+[ ]*5[ ]+jmpw \*%ax
+[ ]*6[ ]+jmpw \*\(%rax\)
+[ ]*7[ ]+
+[ ]*8[ ]+\.intel_syntax noprefix
+[ ]*9[ ]+call ax
+[ ]*10[ ]+callw ax
+[ ]*11[ ]+callw \[rax\]
+[ ]*12[ ]+call WORD PTR \[rax\]
+[ ]*13[ ]+jmp ax
+[ ]*14[ ]+jmpw ax
+[ ]*15[ ]+jmpw \[rax\]
+[ ]*16[ ]+jmp WORD PTR \[rax\]
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-branch-4.s b/gas/testsuite/gas/i386/x86-64-branch-4.s
new file mode 100644
index 0000000..67d6e1f
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-branch-4.s
@@ -0,0 +1,16 @@
+.text
+ callw *%ax
+ callw *(%rax)
+ jmp *%ax
+ jmpw *%ax
+ jmpw *(%rax)
+
+ .intel_syntax noprefix
+ call ax
+ callw ax
+ callw [rax]
+ call WORD PTR [rax]
+ jmp ax
+ jmpw ax
+ jmpw [rax]
+ jmp WORD PTR [rax]
diff --git a/gas/testsuite/gas/i386/x86-64-branch.d b/gas/testsuite/gas/i386/x86-64-branch.d
index 612acc0..773ce71 100644
--- a/gas/testsuite/gas/i386/x86-64-branch.d
+++ b/gas/testsuite/gas/i386/x86-64-branch.d
@@ -9,14 +9,14 @@ Disassembly of section .text:
0+ <.text>:
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: ff d0 callq \*%rax
-[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
-[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
-[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
+[ ]*[a-f0-9]+: 66 ff d0 data16 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff d0 data16 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff 10 data16 callq \*\(%rax\)
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
-[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
-[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
-[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
+[ ]*[a-f0-9]+: 66 ff e0 data16 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff e0 data16 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff 20 data16 jmpq \*\(%rax\)
[ ]*[a-f0-9]+: e8 (00|5b) 00 (00|10) 00 callq (0x1f|10007a <.text\+0x10007a>)
[ ]*[a-f0-9]+: e9 (00|60) 00 (00|10) 00 jmpq (0x24|100084 <.text\+0x100084>)
[ ]*[a-f0-9]+: 66 e8 00 00 00 00 data16 callq (0x2a|2a <.text\+0x2a>)
@@ -24,14 +24,14 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 66 0f 82 00 00 00 00 data16 jb (0x37|37 <.text\+0x37>)
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: ff d0 callq \*%rax
-[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
-[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
-[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
+[ ]*[a-f0-9]+: 66 ff d0 data16 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff d0 data16 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff 10 data16 callq \*\(%rax\)
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
-[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
-[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
-[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
+[ ]*[a-f0-9]+: 66 ff e0 data16 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff e0 data16 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff 20 data16 jmpq \*\(%rax\)
[ ]*[a-f0-9]+: e8 (00|92) 00 (00|10) 00 callq (0x56|1000e8 <.text\+0x1000e8>)
[ ]*[a-f0-9]+: e9 (00|97) 00 (00|10) 00 jmpq (0x5b|1000f2 <.text\+0x1000f2>)
#pass