aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2012-08-06 22:08:25 +0000
committerRoland McGrath <roland@gnu.org>2012-08-06 22:08:25 +0000
commitde88229846525b2afb4a8b85b7f60f3246d3e90d (patch)
tree8f49a4873e0368cd8c47340ce3c8f43b3bb6c4b4 /gas/testsuite
parent99262e37efe7767e8d07aabdddf793dadc14c3ce (diff)
downloadgdb-de88229846525b2afb4a8b85b7f60f3246d3e90d.zip
gdb-de88229846525b2afb4a8b85b7f60f3246d3e90d.tar.gz
gdb-de88229846525b2afb4a8b85b7f60f3246d3e90d.tar.bz2
gas/testsuite/
* gas/i386/x86-64-stack.s: Add cases for push segment register. * gas/i386/x86-64-stack.d: Updated. * gas/i386/x86-64-stack-suffix.d: Updated. * gas/i386/x86-64-stack-intel.d: Updated. * gas/i386/ilp32/x86-64-stack.d: Updated. * gas/i386/ilp32/x86-64-stack-suffix.d: Updated. * gas/i386/ilp32/x86-64-stack-intel.d: Updated. opcodes/ * i386-dis.c (print_insn): Print spaces between multiple excess prefixes. Return actual number of excess prefixes consumed, not always one. * i386-dis.c (OP_REG): Ignore REX_B for segment register cases.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.d10
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-stack-suffix.d10
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-stack.d10
-rw-r--r--gas/testsuite/gas/i386/x86-64-stack-intel.d10
-rw-r--r--gas/testsuite/gas/i386/x86-64-stack-suffix.d10
-rw-r--r--gas/testsuite/gas/i386/x86-64-stack.d10
-rw-r--r--gas/testsuite/gas/i386/x86-64-stack.s5
8 files changed, 73 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 80c03cf..026750e 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -41,6 +41,14 @@
2012-08-06 Roland McGrath <mcgrathr@google.com>
+ * gas/i386/x86-64-stack.s: Add cases for push segment register.
+ * gas/i386/x86-64-stack.d: Updated.
+ * gas/i386/x86-64-stack-suffix.d: Updated.
+ * gas/i386/x86-64-stack-intel.d: Updated.
+ * gas/i386/ilp32/x86-64-stack.d: Updated.
+ * gas/i386/ilp32/x86-64-stack-suffix.d: Updated.
+ * gas/i386/ilp32/x86-64-stack-intel.d: Updated.
+
* gas/i386/x86-64-stack.s: Add cases for push immediate.
* gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.d: Updated.
* gas/testsuite/gas/i386/ilp32/x86-64-stack-suffix.d: Updated.
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.d b/gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.d
index fbcada2..f98b8cd 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.d
@@ -56,5 +56,15 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 03 04 48 add eax,DWORD PTR \[rax\+rcx\*2\]
[ ]*[a-f0-9]+: 68 01 02 03 04 push 0x4030201
[ ]*[a-f0-9]+: 66 48 68 01 02 03 04 data32 rex.W push 0x4030201
+[ ]*[a-f0-9]+: 0f a8 push gs
+[ ]*[a-f0-9]+: 66 0f a8 pushw gs
+[ ]*[a-f0-9]+: 48 0f a8 rex.W push gs
+[ ]*[a-f0-9]+: 66 48 0f a8 data32 rex.W push gs
+[ ]*[a-f0-9]+: 41 0f a8 rex.B push gs
+[ ]*[a-f0-9]+: 66 41 0f a8 rex.B pushw gs
+[ ]*[a-f0-9]+: 48 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B push gs
+[ ]*[a-f0-9]+: 66 48 data16 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B push gs
[ ]*[a-f0-9]+: 90 nop
#pass
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-stack-suffix.d b/gas/testsuite/gas/i386/ilp32/x86-64-stack-suffix.d
index dd2f3da..cecab6d 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-stack-suffix.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-stack-suffix.d
@@ -56,5 +56,15 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 03 04 48 addl \(%rax,%rcx,2\),%eax
[ ]*[a-f0-9]+: 68 01 02 03 04 pushq \$0x4030201
[ ]*[a-f0-9]+: 66 48 68 01 02 03 04 data32 rex.W pushq \$0x4030201
+[ ]*[a-f0-9]+: 0f a8 pushq %gs
+[ ]*[a-f0-9]+: 66 0f a8 pushw %gs
+[ ]*[a-f0-9]+: 48 0f a8 rex.W pushq %gs
+[ ]*[a-f0-9]+: 66 48 0f a8 data32 rex.W pushq %gs
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
+[ ]*[a-f0-9]+: 66 41 0f a8 rex.B pushw %gs
+[ ]*[a-f0-9]+: 48 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
+[ ]*[a-f0-9]+: 66 48 data16 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
[ ]*[a-f0-9]+: 90 nop
#pass
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-stack.d b/gas/testsuite/gas/i386/ilp32/x86-64-stack.d
index 9f4553a..fd649e2 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-stack.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-stack.d
@@ -56,5 +56,15 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 03 04 48 add \(%rax,%rcx,2\),%eax
[ ]*[a-f0-9]+: 68 01 02 03 04 pushq \$0x4030201
[ ]*[a-f0-9]+: 66 48 68 01 02 03 04 data32 rex.W pushq \$0x4030201
+[ ]*[a-f0-9]+: 0f a8 pushq %gs
+[ ]*[a-f0-9]+: 66 0f a8 pushw %gs
+[ ]*[a-f0-9]+: 48 0f a8 rex.W pushq %gs
+[ ]*[a-f0-9]+: 66 48 0f a8 data32 rex.W pushq %gs
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
+[ ]*[a-f0-9]+: 66 41 0f a8 rex.B pushw %gs
+[ ]*[a-f0-9]+: 48 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
+[ ]*[a-f0-9]+: 66 48 data16 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
[ ]*[a-f0-9]+: 90 nop
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-stack-intel.d b/gas/testsuite/gas/i386/x86-64-stack-intel.d
index cb9ee89..1902337 100644
--- a/gas/testsuite/gas/i386/x86-64-stack-intel.d
+++ b/gas/testsuite/gas/i386/x86-64-stack-intel.d
@@ -56,5 +56,15 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 03 04 48 add eax,DWORD PTR \[rax\+rcx\*2\]
[ ]*[a-f0-9]+: 68 01 02 03 04 push 0x4030201
[ ]*[a-f0-9]+: 66 48 68 01 02 03 04 data32 rex.W push 0x4030201
+[ ]*[a-f0-9]+: 0f a8 push gs
+[ ]*[a-f0-9]+: 66 0f a8 pushw gs
+[ ]*[a-f0-9]+: 48 0f a8 rex.W push gs
+[ ]*[a-f0-9]+: 66 48 0f a8 data32 rex.W push gs
+[ ]*[a-f0-9]+: 41 0f a8 rex.B push gs
+[ ]*[a-f0-9]+: 66 41 0f a8 rex.B pushw gs
+[ ]*[a-f0-9]+: 48 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B push gs
+[ ]*[a-f0-9]+: 66 48 data16 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B push gs
[ ]*[a-f0-9]+: 90 nop
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-stack-suffix.d b/gas/testsuite/gas/i386/x86-64-stack-suffix.d
index a0b94d0..1681d79 100644
--- a/gas/testsuite/gas/i386/x86-64-stack-suffix.d
+++ b/gas/testsuite/gas/i386/x86-64-stack-suffix.d
@@ -56,5 +56,15 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 03 04 48 addl \(%rax,%rcx,2\),%eax
[ ]*[a-f0-9]+: 68 01 02 03 04 pushq \$0x4030201
[ ]*[a-f0-9]+: 66 48 68 01 02 03 04 data32 rex.W pushq \$0x4030201
+[ ]*[a-f0-9]+: 0f a8 pushq %gs
+[ ]*[a-f0-9]+: 66 0f a8 pushw %gs
+[ ]*[a-f0-9]+: 48 0f a8 rex.W pushq %gs
+[ ]*[a-f0-9]+: 66 48 0f a8 data32 rex.W pushq %gs
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
+[ ]*[a-f0-9]+: 66 41 0f a8 rex.B pushw %gs
+[ ]*[a-f0-9]+: 48 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
+[ ]*[a-f0-9]+: 66 48 data16 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
[ ]*[a-f0-9]+: 90 nop
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-stack.d b/gas/testsuite/gas/i386/x86-64-stack.d
index 76f7151..760d769 100644
--- a/gas/testsuite/gas/i386/x86-64-stack.d
+++ b/gas/testsuite/gas/i386/x86-64-stack.d
@@ -55,5 +55,15 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 03 04 48 add \(%rax,%rcx,2\),%eax
[ ]*[a-f0-9]+: 68 01 02 03 04 pushq \$0x4030201
[ ]*[a-f0-9]+: 66 48 68 01 02 03 04 data32 rex.W pushq \$0x4030201
+[ ]*[a-f0-9]+: 0f a8 pushq %gs
+[ ]*[a-f0-9]+: 66 0f a8 pushw %gs
+[ ]*[a-f0-9]+: 48 0f a8 rex.W pushq %gs
+[ ]*[a-f0-9]+: 66 48 0f a8 data32 rex.W pushq %gs
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
+[ ]*[a-f0-9]+: 66 41 0f a8 rex.B pushw %gs
+[ ]*[a-f0-9]+: 48 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
+[ ]*[a-f0-9]+: 66 48 data16 rex.W
+[ ]*[a-f0-9]+: 41 0f a8 rex.B pushq %gs
[ ]*[a-f0-9]+: 90 nop
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-stack.s b/gas/testsuite/gas/i386/x86-64-stack.s
index 2da658b..0b8707e 100644
--- a/gas/testsuite/gas/i386/x86-64-stack.s
+++ b/gas/testsuite/gas/i386/x86-64-stack.s
@@ -29,6 +29,11 @@ _start:
# push with a 4-byte immediate
try 0x68, 0x01, 0x02, 0x03, 0x04
+ # push a segment register
+ try 0x0f, 0xa8
+ # with extraneous rex.B
+ try 0x41, 0x0f, 0xa8
+
# This is just to synchronize the disassembly.
# Any new cases must come before this line!
nop