aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-03-09 08:53:38 +0100
committerJan Beulich <jbeulich@suse.com>2021-03-09 08:53:38 +0100
commite93a3b27b23ca2850c01dfc8fdf1aa237d819193 (patch)
tree617254ec1cf8b82d447859f9ad41f263e9c6b5c8 /gas
parent87fa7d568ddd804fb73bb78e33ae1c22d9fe343c (diff)
downloadgdb-e93a3b27b23ca2850c01dfc8fdf1aa237d819193.zip
gdb-e93a3b27b23ca2850c01dfc8fdf1aa237d819193.tar.gz
gdb-e93a3b27b23ca2850c01dfc8fdf1aa237d819193.tar.bz2
x86-64: make SYSEXIT handling similar to SYSRET's
Despite SYSEXIT being an Intel-only insn in long mode, its behavior there is similar to SYSRET's: Depending on REX.W execution continues in either 64-bit or compatibility mode. Hence distinguishing by suffix is as necessary here as it is there.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog15
-rw-r--r--gas/testsuite/gas/i386/noreg-intel64.l1
-rw-r--r--gas/testsuite/gas/i386/noreg64-data16.d1
-rw-r--r--gas/testsuite/gas/i386/noreg64-data16.e4
-rw-r--r--gas/testsuite/gas/i386/noreg64-rex64.d1
-rw-r--r--gas/testsuite/gas/i386/noreg64.d1
-rw-r--r--gas/testsuite/gas/i386/noreg64.l1
-rw-r--r--gas/testsuite/gas/i386/noreg64.s1
-rw-r--r--gas/testsuite/gas/i386/x86-64-sysenter-amd.d2
-rw-r--r--gas/testsuite/gas/i386/x86-64-sysenter-amd.l4
-rw-r--r--gas/testsuite/gas/i386/x86-64-sysenter-amd.s6
-rw-r--r--gas/testsuite/gas/i386/x86-64-sysenter-intel.d6
12 files changed, 36 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 8dd9a59..ee553fb 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,18 @@
+2021-03-09 Jan Beulich <jbeulich@suse.com>
+
+ * testsuite/gas/i386/noreg64.s: Add sysexit.
+ * testsuite/gas/i386/x86-64-sysenter-amd.s: Split sysexit into
+ sysexitl and sysexitq.
+ * testsuite/gas/i386/noreg-intel64.l,
+ testsuite/gas/i386/noreg64-data16.d,
+ testsuite/gas/i386/noreg64-data16.e,
+ testsuite/gas/i386/noreg64-rex64.d,
+ testsuite/gas/i386/noreg64.d,
+ testsuite/gas/i386/noreg64.l,
+ testsuite/gas/i386/x86-64-sysenter-amd.d,
+ testsuite/gas/i386/x86-64-sysenter-amd.l,
+ testsuite/gas/i386/x86-64-sysenter-intel.d: Adjust expectations.
+
2021-02-26 Nick Clifton <nickc@redhat.com>
PR 27411
diff --git a/gas/testsuite/gas/i386/noreg-intel64.l b/gas/testsuite/gas/i386/noreg-intel64.l
index 4bcec14..9b9226d 100644
--- a/gas/testsuite/gas/i386/noreg-intel64.l
+++ b/gas/testsuite/gas/i386/noreg-intel64.l
@@ -124,6 +124,7 @@
.*:[1-9][0-9]*: Warning: .* `sub'
.*:[1-9][0-9]*: Warning: .* `sub'
.*:[1-9][0-9]*: Warning: .* `sub'
+.*:[1-9][0-9]*: Warning: .* `sysexit'
.*:[1-9][0-9]*: Warning: .* `sysret'
.*:[1-9][0-9]*: Warning: .* `test'
.*:[1-9][0-9]*: Warning: .* `test'
diff --git a/gas/testsuite/gas/i386/noreg64-data16.d b/gas/testsuite/gas/i386/noreg64-data16.d
index 881043d..f5e921c 100644
--- a/gas/testsuite/gas/i386/noreg64-data16.d
+++ b/gas/testsuite/gas/i386/noreg64-data16.d
@@ -150,6 +150,7 @@ Disassembly of section .text:
*[a-f0-9]+: 66 81 28 89 00 subw \$0x89,\(%rax\)
*[a-f0-9]+: 66 81 28 34 12 subw \$0x1234,\(%rax\)
*[a-f0-9]+: 66 81 28 78 56 subw \$0x5678,\(%rax\)
+ *[a-f0-9]+: 66 0f 35 data16 sysexitl *
*[a-f0-9]+: 66 0f 07 data16 sysretl *
*[a-f0-9]+: 66 f7 00 89 00 testw \$0x89,\(%rax\)
*[a-f0-9]+: 66 f7 00 34 12 testw \$0x1234,\(%rax\)
diff --git a/gas/testsuite/gas/i386/noreg64-data16.e b/gas/testsuite/gas/i386/noreg64-data16.e
index 24c595a..5b37033 100644
--- a/gas/testsuite/gas/i386/noreg64-data16.e
+++ b/gas/testsuite/gas/i386/noreg64-data16.e
@@ -7,5 +7,5 @@
.*:117: Warning: .*shortened.*
.*:146: Warning: .*shortened.*
.*:170: Warning: .*shortened.*
-.*:174: Warning: .*shortened.*
-.*:178: Warning: .*shortened.*
+.*:175: Warning: .*shortened.*
+.*:179: Warning: .*shortened.*
diff --git a/gas/testsuite/gas/i386/noreg64-rex64.d b/gas/testsuite/gas/i386/noreg64-rex64.d
index db36de4..bf16ab7 100644
--- a/gas/testsuite/gas/i386/noreg64-rex64.d
+++ b/gas/testsuite/gas/i386/noreg64-rex64.d
@@ -149,6 +149,7 @@ Disassembly of section .text:
*[a-f0-9]+: 48 81 28 89 00 00 00 subq \$0x89,\(%rax\)
*[a-f0-9]+: 48 81 28 34 12 00 00 subq \$0x1234,\(%rax\)
*[a-f0-9]+: 48 81 28 78 56 34 12 subq \$0x12345678,\(%rax\)
+ *[a-f0-9]+: 48 0f 35 sysexitq *
*[a-f0-9]+: 48 0f 07 sysretq *
*[a-f0-9]+: 48 f7 00 89 00 00 00 testq \$0x89,\(%rax\)
*[a-f0-9]+: 48 f7 00 34 12 00 00 testq \$0x1234,\(%rax\)
diff --git a/gas/testsuite/gas/i386/noreg64.d b/gas/testsuite/gas/i386/noreg64.d
index 6cc461f..e73caee 100644
--- a/gas/testsuite/gas/i386/noreg64.d
+++ b/gas/testsuite/gas/i386/noreg64.d
@@ -151,6 +151,7 @@ Disassembly of section .text:
*[a-f0-9]+: 81 28 89 00 00 00 subl \$0x89,\(%rax\)
*[a-f0-9]+: 81 28 34 12 00 00 subl \$0x1234,\(%rax\)
*[a-f0-9]+: 81 28 78 56 34 12 subl \$0x12345678,\(%rax\)
+ *[a-f0-9]+: 0f 35 sysexitl *
*[a-f0-9]+: 0f 07 sysretl *
*[a-f0-9]+: f7 00 89 00 00 00 testl \$0x89,\(%rax\)
*[a-f0-9]+: f7 00 34 12 00 00 testl \$0x1234,\(%rax\)
diff --git a/gas/testsuite/gas/i386/noreg64.l b/gas/testsuite/gas/i386/noreg64.l
index c4e8b05..23baa26 100644
--- a/gas/testsuite/gas/i386/noreg64.l
+++ b/gas/testsuite/gas/i386/noreg64.l
@@ -122,6 +122,7 @@
.*:[1-9][0-9]*: Warning: .* `sub'
.*:[1-9][0-9]*: Warning: .* `sub'
.*:[1-9][0-9]*: Warning: .* `sub'
+.*:[1-9][0-9]*: Warning: .* `sysexit'
.*:[1-9][0-9]*: Warning: .* `sysret'
.*:[1-9][0-9]*: Warning: .* `test'
.*:[1-9][0-9]*: Warning: .* `test'
diff --git a/gas/testsuite/gas/i386/noreg64.s b/gas/testsuite/gas/i386/noreg64.s
index 6845bb7..c067f88 100644
--- a/gas/testsuite/gas/i386/noreg64.s
+++ b/gas/testsuite/gas/i386/noreg64.s
@@ -168,6 +168,7 @@ noreg:
pfx sub $0x89, (%rax)
pfx sub $0x1234, (%rax)
pfx sub $0x12345678, (%rax)
+ pfx sysexit
pfx sysret
pfx test $0x89, (%rax)
pfx test $0x1234, (%rax)
diff --git a/gas/testsuite/gas/i386/x86-64-sysenter-amd.d b/gas/testsuite/gas/i386/x86-64-sysenter-amd.d
index 5b2fc37..b3fa23c 100644
--- a/gas/testsuite/gas/i386/x86-64-sysenter-amd.d
+++ b/gas/testsuite/gas/i386/x86-64-sysenter-amd.d
@@ -9,6 +9,8 @@ Disassembly of section .text:
0+ <.text>:
[ ]*[a-f0-9]+:[ ]+0f 34[ ]+\(bad\)[ ]*
[ ]*[a-f0-9]+:[ ]+0f 35[ ]+\(bad\)[ ]*
+[ ]*[a-f0-9]+:[ ]+48 0f 35[ ]+\(bad\)[ ]*
[ ]*[a-f0-9]+:[ ]+0f 34[ ]+\(bad\)[ ]*
[ ]*[a-f0-9]+:[ ]+0f 35[ ]+\(bad\)[ ]*
+[ ]*[a-f0-9]+:[ ]+48 0f 35[ ]+\(bad\)[ ]*
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-sysenter-amd.l b/gas/testsuite/gas/i386/x86-64-sysenter-amd.l
index faa2562..c7d30e2 100644
--- a/gas/testsuite/gas/i386/x86-64-sysenter-amd.l
+++ b/gas/testsuite/gas/i386/x86-64-sysenter-amd.l
@@ -1,5 +1,7 @@
.*: Assembler messages:
.*:2: Error: .*
.*:3: Error: .*
-.*:6: Error: .*
+.*:4: Error: .*
.*:7: Error: .*
+.*:8: Error: .*
+.*:9: Error: .*
diff --git a/gas/testsuite/gas/i386/x86-64-sysenter-amd.s b/gas/testsuite/gas/i386/x86-64-sysenter-amd.s
index b6d31f9..bf9bdda 100644
--- a/gas/testsuite/gas/i386/x86-64-sysenter-amd.s
+++ b/gas/testsuite/gas/i386/x86-64-sysenter-amd.s
@@ -1,7 +1,9 @@
.text
sysenter
- sysexit
+ sysexitl
+ sysexitq
.intel_syntax noprefix
sysenter
- sysexit
+ sysexitd
+ sysexitq
diff --git a/gas/testsuite/gas/i386/x86-64-sysenter-intel.d b/gas/testsuite/gas/i386/x86-64-sysenter-intel.d
index ffd5e3e..451cd91 100644
--- a/gas/testsuite/gas/i386/x86-64-sysenter-intel.d
+++ b/gas/testsuite/gas/i386/x86-64-sysenter-intel.d
@@ -9,7 +9,9 @@ Disassembly of section .text:
0+ <.text>:
[ ]*[a-f0-9]+: 0f 34 sysenter *
-[ ]*[a-f0-9]+: 0f 35 sysexit *
+[ ]*[a-f0-9]+: 0f 35 sysexitl *
+[ ]*[a-f0-9]+: 48 0f 35 sysexitq *
[ ]*[a-f0-9]+: 0f 34 sysenter *
-[ ]*[a-f0-9]+: 0f 35 sysexit *
+[ ]*[a-f0-9]+: 0f 35 sysexitl *
+[ ]*[a-f0-9]+: 48 0f 35 sysexitq *
#pass