aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2012-08-06 20:19:34 +0000
committerRoland McGrath <roland@gnu.org>2012-08-06 20:19:34 +0000
commit7bb15c6f21865baeedeb6e3765af8643c082cf47 (patch)
tree608ca2f22ed989bb195b3c8fbee8b51949f8f327 /gas
parent777f26c29b7a8c9f5f3b99788736559c100f5217 (diff)
downloadgdb-7bb15c6f21865baeedeb6e3765af8643c082cf47.zip
gdb-7bb15c6f21865baeedeb6e3765af8643c082cf47.tar.gz
gdb-7bb15c6f21865baeedeb6e3765af8643c082cf47.tar.bz2
gas/testsuite/
* 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. * gas/testsuite/gas/i386/ilp32/x86-64-stack.d: Updated. * gas/testsuite/gas/i386/x86-64-stack-intel.d: Updated. * gas/testsuite/gas/i386/x86-64-stack-suffix.d: Updated. * gas/testsuite/gas/i386/x86-64-stack.d: Updated. opcodes/ * i386-dis.c (OP_sI): In b_T_mode and v_mode, REX_W trumps DFLAG. (putop): For 'T', 'U', and 'V', treat REX_W like DFLAG. (intel_operand_size): For stack_v_mode, treat REX_W like DFLAG. (OP_E_register): Likewise. (OP_REG): For low 8 whole registers, treat REX_W like DFLAG.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog10
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.d30
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-stack-suffix.d30
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-stack.d30
-rw-r--r--gas/testsuite/gas/i386/x86-64-stack-intel.d30
-rw-r--r--gas/testsuite/gas/i386/x86-64-stack-suffix.d30
-rw-r--r--gas/testsuite/gas/i386/x86-64-stack.d30
-rw-r--r--gas/testsuite/gas/i386/x86-64-stack.s10
8 files changed, 139 insertions, 61 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 61ef22a..fd73cce 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,4 +1,12 @@
-2012-08-03 Roland McGrath <mcgrathr@google.com>
+2012-08-06 Roland McGrath <mcgrathr@google.com>
+
+ * 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.
+ * gas/testsuite/gas/i386/ilp32/x86-64-stack.d: Updated.
+ * gas/testsuite/gas/i386/x86-64-stack-intel.d: Updated.
+ * gas/testsuite/gas/i386/x86-64-stack-suffix.d: Updated.
+ * gas/testsuite/gas/i386/x86-64-stack.d: Updated.
* gas/i386/x86-64-stack.s (try): Also try just rex.W (0x48) prefix.
* gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.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 7092a42..fbcada2 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-stack-intel.d
@@ -10,41 +10,51 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 50 push rax
[ ]*[a-f0-9]+: 66 50 push ax
[ ]*[a-f0-9]+: 48 50 rex.W push rax
-[ ]*[a-f0-9]+: 66 48 50 data32 push rax
+[ ]*[a-f0-9]+: 66 48 50 data32 rex.W push rax
[ ]*[a-f0-9]+: 58 pop rax
[ ]*[a-f0-9]+: 66 58 pop ax
[ ]*[a-f0-9]+: 48 58 rex.W pop rax
-[ ]*[a-f0-9]+: 66 48 58 data32 pop rax
+[ ]*[a-f0-9]+: 66 48 58 data32 rex.W pop rax
[ ]*[a-f0-9]+: 8f c0 pop rax
[ ]*[a-f0-9]+: 66 8f c0 pop ax
[ ]*[a-f0-9]+: 48 8f c0 rex.W pop rax
-[ ]*[a-f0-9]+: 66 48 8f c0 data32 pop rax
+[ ]*[a-f0-9]+: 66 48 8f c0 data32 rex.W pop rax
[ ]*[a-f0-9]+: 8f 00 pop QWORD PTR \[rax\]
[ ]*[a-f0-9]+: 66 8f 00 pop WORD PTR \[rax\]
[ ]*[a-f0-9]+: 48 8f 00 rex.W pop QWORD PTR \[rax\]
-[ ]*[a-f0-9]+: 66 48 8f 00 data32 pop QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 66 48 8f 00 data32 rex.W pop QWORD PTR \[rax\]
[ ]*[a-f0-9]+: ff d0 call rax
[ ]*[a-f0-9]+: 66 ff d0 call ax
[ ]*[a-f0-9]+: 48 ff d0 rex.W call rax
-[ ]*[a-f0-9]+: 66 48 ff d0 data32 call rax
+[ ]*[a-f0-9]+: 66 48 ff d0 data32 rex.W call rax
[ ]*[a-f0-9]+: ff 10 call QWORD PTR \[rax\]
[ ]*[a-f0-9]+: 66 ff 10 call WORD PTR \[rax\]
[ ]*[a-f0-9]+: 48 ff 10 rex.W call QWORD PTR \[rax\]
-[ ]*[a-f0-9]+: 66 48 ff 10 data32 call QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 66 48 ff 10 data32 rex.W call QWORD PTR \[rax\]
[ ]*[a-f0-9]+: ff e0 jmp rax
[ ]*[a-f0-9]+: 66 ff e0 jmp ax
[ ]*[a-f0-9]+: 48 ff e0 rex.W jmp rax
-[ ]*[a-f0-9]+: 66 48 ff e0 data32 jmp rax
+[ ]*[a-f0-9]+: 66 48 ff e0 data32 rex.W jmp rax
[ ]*[a-f0-9]+: ff 20 jmp QWORD PTR \[rax\]
[ ]*[a-f0-9]+: 66 ff 20 jmp WORD PTR \[rax\]
[ ]*[a-f0-9]+: 48 ff 20 rex.W jmp QWORD PTR \[rax\]
-[ ]*[a-f0-9]+: 66 48 ff 20 data32 jmp QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 66 48 ff 20 data32 rex.W jmp QWORD PTR \[rax\]
[ ]*[a-f0-9]+: ff f0 push rax
[ ]*[a-f0-9]+: 66 ff f0 push ax
[ ]*[a-f0-9]+: 48 ff f0 rex.W push rax
-[ ]*[a-f0-9]+: 66 48 ff f0 data32 push rax
+[ ]*[a-f0-9]+: 66 48 ff f0 data32 rex.W push rax
[ ]*[a-f0-9]+: ff 30 push QWORD PTR \[rax\]
[ ]*[a-f0-9]+: 66 ff 30 push WORD PTR \[rax\]
[ ]*[a-f0-9]+: 48 ff 30 rex.W push QWORD PTR \[rax\]
-[ ]*[a-f0-9]+: 66 48 ff 30 data32 push QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 66 48 ff 30 data32 rex.W push QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 6a ff push 0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 6a ff pushw 0xffff
+[ ]*[a-f0-9]+: 48 6a ff rex.W push 0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 48 6a ff data32 rex.W push 0xffffffffffffffff
+[ ]*[a-f0-9]+: 68 01 02 03 04 push 0x4030201
+[ ]*[a-f0-9]+: 66 68 01 02 pushw 0x201
+[ ]*[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]+: 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 45101dd..dd2f3da 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-stack-suffix.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-stack-suffix.d
@@ -10,41 +10,51 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 50 pushq %rax
[ ]*[a-f0-9]+: 66 50 pushw %ax
[ ]*[a-f0-9]+: 48 50 rex.W pushq %rax
-[ ]*[a-f0-9]+: 66 48 50 data32 pushq %rax
+[ ]*[a-f0-9]+: 66 48 50 data32 rex.W pushq %rax
[ ]*[a-f0-9]+: 58 popq %rax
[ ]*[a-f0-9]+: 66 58 popw %ax
[ ]*[a-f0-9]+: 48 58 rex.W popq %rax
-[ ]*[a-f0-9]+: 66 48 58 data32 popq %rax
+[ ]*[a-f0-9]+: 66 48 58 data32 rex.W popq %rax
[ ]*[a-f0-9]+: 8f c0 popq %rax
[ ]*[a-f0-9]+: 66 8f c0 popw %ax
[ ]*[a-f0-9]+: 48 8f c0 rex.W popq %rax
-[ ]*[a-f0-9]+: 66 48 8f c0 data32 popq %rax
+[ ]*[a-f0-9]+: 66 48 8f c0 data32 rex.W popq %rax
[ ]*[a-f0-9]+: 8f 00 popq \(%rax\)
[ ]*[a-f0-9]+: 66 8f 00 popw \(%rax\)
[ ]*[a-f0-9]+: 48 8f 00 rex.W popq \(%rax\)
-[ ]*[a-f0-9]+: 66 48 8f 00 data32 popq \(%rax\)
+[ ]*[a-f0-9]+: 66 48 8f 00 data32 rex.W popq \(%rax\)
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
[ ]*[a-f0-9]+: 48 ff d0 rex.W callq \*%rax
-[ ]*[a-f0-9]+: 66 48 ff d0 data32 callq \*%rax
+[ ]*[a-f0-9]+: 66 48 ff d0 data32 rex.W callq \*%rax
[ ]*[a-f0-9]+: ff 10 callq \*\(%rax\)
[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
[ ]*[a-f0-9]+: 48 ff 10 rex.W callq \*\(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 10 data32 callq \*\(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 10 data32 rex.W callq \*\(%rax\)
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
[ ]*[a-f0-9]+: 48 ff e0 rex.W jmpq \*%rax
-[ ]*[a-f0-9]+: 66 48 ff e0 data32 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 48 ff e0 data32 rex.W jmpq \*%rax
[ ]*[a-f0-9]+: ff 20 jmpq \*\(%rax\)
[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
[ ]*[a-f0-9]+: 48 ff 20 rex.W jmpq \*\(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 20 data32 jmpq \*\(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 20 data32 rex.W jmpq \*\(%rax\)
[ ]*[a-f0-9]+: ff f0 pushq %rax
[ ]*[a-f0-9]+: 66 ff f0 pushw %ax
[ ]*[a-f0-9]+: 48 ff f0 rex.W pushq %rax
-[ ]*[a-f0-9]+: 66 48 ff f0 data32 pushq %rax
+[ ]*[a-f0-9]+: 66 48 ff f0 data32 rex.W pushq %rax
[ ]*[a-f0-9]+: ff 30 pushq \(%rax\)
[ ]*[a-f0-9]+: 66 ff 30 pushw \(%rax\)
[ ]*[a-f0-9]+: 48 ff 30 rex.W pushq \(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 30 data32 pushq \(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 30 data32 rex.W pushq \(%rax\)
+[ ]*[a-f0-9]+: 6a ff pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 6a ff pushw \$0xffff
+[ ]*[a-f0-9]+: 48 6a ff rex.W pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 48 6a ff data32 rex.W pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 68 01 02 03 04 pushq \$0x4030201
+[ ]*[a-f0-9]+: 66 68 01 02 pushw \$0x201
+[ ]*[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]+: 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 4976597..9f4553a 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-stack.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-stack.d
@@ -10,41 +10,51 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 50 push %rax
[ ]*[a-f0-9]+: 66 50 push %ax
[ ]*[a-f0-9]+: 48 50 rex.W push %rax
-[ ]*[a-f0-9]+: 66 48 50 data32 push %rax
+[ ]*[a-f0-9]+: 66 48 50 data32 rex.W push %rax
[ ]*[a-f0-9]+: 58 pop %rax
[ ]*[a-f0-9]+: 66 58 pop %ax
[ ]*[a-f0-9]+: 48 58 rex.W pop %rax
-[ ]*[a-f0-9]+: 66 48 58 data32 pop %rax
+[ ]*[a-f0-9]+: 66 48 58 data32 rex.W pop %rax
[ ]*[a-f0-9]+: 8f c0 pop %rax
[ ]*[a-f0-9]+: 66 8f c0 pop %ax
[ ]*[a-f0-9]+: 48 8f c0 rex.W pop %rax
-[ ]*[a-f0-9]+: 66 48 8f c0 data32 pop %rax
+[ ]*[a-f0-9]+: 66 48 8f c0 data32 rex.W pop %rax
[ ]*[a-f0-9]+: 8f 00 popq \(%rax\)
[ ]*[a-f0-9]+: 66 8f 00 popw \(%rax\)
[ ]*[a-f0-9]+: 48 8f 00 rex.W popq \(%rax\)
-[ ]*[a-f0-9]+: 66 48 8f 00 data32 popq \(%rax\)
+[ ]*[a-f0-9]+: 66 48 8f 00 data32 rex.W popq \(%rax\)
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
[ ]*[a-f0-9]+: 48 ff d0 rex.W callq \*%rax
-[ ]*[a-f0-9]+: 66 48 ff d0 data32 callq \*%rax
+[ ]*[a-f0-9]+: 66 48 ff d0 data32 rex.W callq \*%rax
[ ]*[a-f0-9]+: ff 10 callq \*\(%rax\)
[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
[ ]*[a-f0-9]+: 48 ff 10 rex.W callq \*\(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 10 data32 callq \*\(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 10 data32 rex.W callq \*\(%rax\)
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
[ ]*[a-f0-9]+: 48 ff e0 rex.W jmpq \*%rax
-[ ]*[a-f0-9]+: 66 48 ff e0 data32 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 48 ff e0 data32 rex.W jmpq \*%rax
[ ]*[a-f0-9]+: ff 20 jmpq \*\(%rax\)
[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
[ ]*[a-f0-9]+: 48 ff 20 rex.W jmpq \*\(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 20 data32 jmpq \*\(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 20 data32 rex.W jmpq \*\(%rax\)
[ ]*[a-f0-9]+: ff f0 push %rax
[ ]*[a-f0-9]+: 66 ff f0 push %ax
[ ]*[a-f0-9]+: 48 ff f0 rex.W push %rax
-[ ]*[a-f0-9]+: 66 48 ff f0 data32 push %rax
+[ ]*[a-f0-9]+: 66 48 ff f0 data32 rex.W push %rax
[ ]*[a-f0-9]+: ff 30 pushq \(%rax\)
[ ]*[a-f0-9]+: 66 ff 30 pushw \(%rax\)
[ ]*[a-f0-9]+: 48 ff 30 rex.W pushq \(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 30 data32 pushq \(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 30 data32 rex.W pushq \(%rax\)
+[ ]*[a-f0-9]+: 6a ff pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 6a ff pushw \$0xffff
+[ ]*[a-f0-9]+: 48 6a ff rex.W pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 48 6a ff data32 rex.W pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 68 01 02 03 04 pushq \$0x4030201
+[ ]*[a-f0-9]+: 66 68 01 02 pushw \$0x201
+[ ]*[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]+: 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 4c54af7..cb9ee89 100644
--- a/gas/testsuite/gas/i386/x86-64-stack-intel.d
+++ b/gas/testsuite/gas/i386/x86-64-stack-intel.d
@@ -10,41 +10,51 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 50 push rax
[ ]*[a-f0-9]+: 66 50 push ax
[ ]*[a-f0-9]+: 48 50 rex.W push rax
-[ ]*[a-f0-9]+: 66 48 50 data32 push rax
+[ ]*[a-f0-9]+: 66 48 50 data32 rex.W push rax
[ ]*[a-f0-9]+: 58 pop rax
[ ]*[a-f0-9]+: 66 58 pop ax
[ ]*[a-f0-9]+: 48 58 rex.W pop rax
-[ ]*[a-f0-9]+: 66 48 58 data32 pop rax
+[ ]*[a-f0-9]+: 66 48 58 data32 rex.W pop rax
[ ]*[a-f0-9]+: 8f c0 pop rax
[ ]*[a-f0-9]+: 66 8f c0 pop ax
[ ]*[a-f0-9]+: 48 8f c0 rex.W pop rax
-[ ]*[a-f0-9]+: 66 48 8f c0 data32 pop rax
+[ ]*[a-f0-9]+: 66 48 8f c0 data32 rex.W pop rax
[ ]*[a-f0-9]+: 8f 00 pop QWORD PTR \[rax\]
[ ]*[a-f0-9]+: 66 8f 00 pop WORD PTR \[rax\]
[ ]*[a-f0-9]+: 48 8f 00 rex.W pop QWORD PTR \[rax\]
-[ ]*[a-f0-9]+: 66 48 8f 00 data32 pop QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 66 48 8f 00 data32 rex.W pop QWORD PTR \[rax\]
[ ]*[a-f0-9]+: ff d0 call rax
[ ]*[a-f0-9]+: 66 ff d0 call ax
[ ]*[a-f0-9]+: 48 ff d0 rex.W call rax
-[ ]*[a-f0-9]+: 66 48 ff d0 data32 call rax
+[ ]*[a-f0-9]+: 66 48 ff d0 data32 rex.W call rax
[ ]*[a-f0-9]+: ff 10 call QWORD PTR \[rax\]
[ ]*[a-f0-9]+: 66 ff 10 call WORD PTR \[rax\]
[ ]*[a-f0-9]+: 48 ff 10 rex.W call QWORD PTR \[rax\]
-[ ]*[a-f0-9]+: 66 48 ff 10 data32 call QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 66 48 ff 10 data32 rex.W call QWORD PTR \[rax\]
[ ]*[a-f0-9]+: ff e0 jmp rax
[ ]*[a-f0-9]+: 66 ff e0 jmp ax
[ ]*[a-f0-9]+: 48 ff e0 rex.W jmp rax
-[ ]*[a-f0-9]+: 66 48 ff e0 data32 jmp rax
+[ ]*[a-f0-9]+: 66 48 ff e0 data32 rex.W jmp rax
[ ]*[a-f0-9]+: ff 20 jmp QWORD PTR \[rax\]
[ ]*[a-f0-9]+: 66 ff 20 jmp WORD PTR \[rax\]
[ ]*[a-f0-9]+: 48 ff 20 rex.W jmp QWORD PTR \[rax\]
-[ ]*[a-f0-9]+: 66 48 ff 20 data32 jmp QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 66 48 ff 20 data32 rex.W jmp QWORD PTR \[rax\]
[ ]*[a-f0-9]+: ff f0 push rax
[ ]*[a-f0-9]+: 66 ff f0 push ax
[ ]*[a-f0-9]+: 48 ff f0 rex.W push rax
-[ ]*[a-f0-9]+: 66 48 ff f0 data32 push rax
+[ ]*[a-f0-9]+: 66 48 ff f0 data32 rex.W push rax
[ ]*[a-f0-9]+: ff 30 push QWORD PTR \[rax\]
[ ]*[a-f0-9]+: 66 ff 30 push WORD PTR \[rax\]
[ ]*[a-f0-9]+: 48 ff 30 rex.W push QWORD PTR \[rax\]
-[ ]*[a-f0-9]+: 66 48 ff 30 data32 push QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 66 48 ff 30 data32 rex.W push QWORD PTR \[rax\]
+[ ]*[a-f0-9]+: 6a ff push 0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 6a ff pushw 0xffff
+[ ]*[a-f0-9]+: 48 6a ff rex.W push 0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 48 6a ff data32 rex.W push 0xffffffffffffffff
+[ ]*[a-f0-9]+: 68 01 02 03 04 push 0x4030201
+[ ]*[a-f0-9]+: 66 68 01 02 pushw 0x201
+[ ]*[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]+: 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 07bf79b..a0b94d0 100644
--- a/gas/testsuite/gas/i386/x86-64-stack-suffix.d
+++ b/gas/testsuite/gas/i386/x86-64-stack-suffix.d
@@ -10,41 +10,51 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 50 pushq %rax
[ ]*[a-f0-9]+: 66 50 pushw %ax
[ ]*[a-f0-9]+: 48 50 rex.W pushq %rax
-[ ]*[a-f0-9]+: 66 48 50 data32 pushq %rax
+[ ]*[a-f0-9]+: 66 48 50 data32 rex.W pushq %rax
[ ]*[a-f0-9]+: 58 popq %rax
[ ]*[a-f0-9]+: 66 58 popw %ax
[ ]*[a-f0-9]+: 48 58 rex.W popq %rax
-[ ]*[a-f0-9]+: 66 48 58 data32 popq %rax
+[ ]*[a-f0-9]+: 66 48 58 data32 rex.W popq %rax
[ ]*[a-f0-9]+: 8f c0 popq %rax
[ ]*[a-f0-9]+: 66 8f c0 popw %ax
[ ]*[a-f0-9]+: 48 8f c0 rex.W popq %rax
-[ ]*[a-f0-9]+: 66 48 8f c0 data32 popq %rax
+[ ]*[a-f0-9]+: 66 48 8f c0 data32 rex.W popq %rax
[ ]*[a-f0-9]+: 8f 00 popq \(%rax\)
[ ]*[a-f0-9]+: 66 8f 00 popw \(%rax\)
[ ]*[a-f0-9]+: 48 8f 00 rex.W popq \(%rax\)
-[ ]*[a-f0-9]+: 66 48 8f 00 data32 popq \(%rax\)
+[ ]*[a-f0-9]+: 66 48 8f 00 data32 rex.W popq \(%rax\)
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
[ ]*[a-f0-9]+: 48 ff d0 rex.W callq \*%rax
-[ ]*[a-f0-9]+: 66 48 ff d0 data32 callq \*%rax
+[ ]*[a-f0-9]+: 66 48 ff d0 data32 rex.W callq \*%rax
[ ]*[a-f0-9]+: ff 10 callq \*\(%rax\)
[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
[ ]*[a-f0-9]+: 48 ff 10 rex.W callq \*\(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 10 data32 callq \*\(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 10 data32 rex.W callq \*\(%rax\)
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
[ ]*[a-f0-9]+: 48 ff e0 rex.W jmpq \*%rax
-[ ]*[a-f0-9]+: 66 48 ff e0 data32 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 48 ff e0 data32 rex.W jmpq \*%rax
[ ]*[a-f0-9]+: ff 20 jmpq \*\(%rax\)
[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
[ ]*[a-f0-9]+: 48 ff 20 rex.W jmpq \*\(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 20 data32 jmpq \*\(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 20 data32 rex.W jmpq \*\(%rax\)
[ ]*[a-f0-9]+: ff f0 pushq %rax
[ ]*[a-f0-9]+: 66 ff f0 pushw %ax
[ ]*[a-f0-9]+: 48 ff f0 rex.W pushq %rax
-[ ]*[a-f0-9]+: 66 48 ff f0 data32 pushq %rax
+[ ]*[a-f0-9]+: 66 48 ff f0 data32 rex.W pushq %rax
[ ]*[a-f0-9]+: ff 30 pushq \(%rax\)
[ ]*[a-f0-9]+: 66 ff 30 pushw \(%rax\)
[ ]*[a-f0-9]+: 48 ff 30 rex.W pushq \(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 30 data32 pushq \(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 30 data32 rex.W pushq \(%rax\)
+[ ]*[a-f0-9]+: 6a ff pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 6a ff pushw \$0xffff
+[ ]*[a-f0-9]+: 48 6a ff rex.W pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 48 6a ff data32 rex.W pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 68 01 02 03 04 pushq \$0x4030201
+[ ]*[a-f0-9]+: 66 68 01 02 pushw \$0x201
+[ ]*[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]+: 90 nop
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-stack.d b/gas/testsuite/gas/i386/x86-64-stack.d
index 0ab339d..76f7151 100644
--- a/gas/testsuite/gas/i386/x86-64-stack.d
+++ b/gas/testsuite/gas/i386/x86-64-stack.d
@@ -9,41 +9,51 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 50 push %rax
[ ]*[a-f0-9]+: 66 50 push %ax
[ ]*[a-f0-9]+: 48 50 rex.W push %rax
-[ ]*[a-f0-9]+: 66 48 50 data32 push %rax
+[ ]*[a-f0-9]+: 66 48 50 data32 rex.W push %rax
[ ]*[a-f0-9]+: 58 pop %rax
[ ]*[a-f0-9]+: 66 58 pop %ax
[ ]*[a-f0-9]+: 48 58 rex.W pop %rax
-[ ]*[a-f0-9]+: 66 48 58 data32 pop %rax
+[ ]*[a-f0-9]+: 66 48 58 data32 rex.W pop %rax
[ ]*[a-f0-9]+: 8f c0 pop %rax
[ ]*[a-f0-9]+: 66 8f c0 pop %ax
[ ]*[a-f0-9]+: 48 8f c0 rex.W pop %rax
-[ ]*[a-f0-9]+: 66 48 8f c0 data32 pop %rax
+[ ]*[a-f0-9]+: 66 48 8f c0 data32 rex.W pop %rax
[ ]*[a-f0-9]+: 8f 00 popq \(%rax\)
[ ]*[a-f0-9]+: 66 8f 00 popw \(%rax\)
[ ]*[a-f0-9]+: 48 8f 00 rex.W popq \(%rax\)
-[ ]*[a-f0-9]+: 66 48 8f 00 data32 popq \(%rax\)
+[ ]*[a-f0-9]+: 66 48 8f 00 data32 rex.W popq \(%rax\)
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
[ ]*[a-f0-9]+: 48 ff d0 rex.W callq \*%rax
-[ ]*[a-f0-9]+: 66 48 ff d0 data32 callq \*%rax
+[ ]*[a-f0-9]+: 66 48 ff d0 data32 rex.W callq \*%rax
[ ]*[a-f0-9]+: ff 10 callq \*\(%rax\)
[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
[ ]*[a-f0-9]+: 48 ff 10 rex.W callq \*\(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 10 data32 callq \*\(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 10 data32 rex.W callq \*\(%rax\)
[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
[ ]*[a-f0-9]+: 48 ff e0 rex.W jmpq \*%rax
-[ ]*[a-f0-9]+: 66 48 ff e0 data32 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 48 ff e0 data32 rex.W jmpq \*%rax
[ ]*[a-f0-9]+: ff 20 jmpq \*\(%rax\)
[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
[ ]*[a-f0-9]+: 48 ff 20 rex.W jmpq \*\(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 20 data32 jmpq \*\(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 20 data32 rex.W jmpq \*\(%rax\)
[ ]*[a-f0-9]+: ff f0 push %rax
[ ]*[a-f0-9]+: 66 ff f0 push %ax
[ ]*[a-f0-9]+: 48 ff f0 rex.W push %rax
-[ ]*[a-f0-9]+: 66 48 ff f0 data32 push %rax
+[ ]*[a-f0-9]+: 66 48 ff f0 data32 rex.W push %rax
[ ]*[a-f0-9]+: ff 30 pushq \(%rax\)
[ ]*[a-f0-9]+: 66 ff 30 pushw \(%rax\)
[ ]*[a-f0-9]+: 48 ff 30 rex.W pushq \(%rax\)
-[ ]*[a-f0-9]+: 66 48 ff 30 data32 pushq \(%rax\)
+[ ]*[a-f0-9]+: 66 48 ff 30 data32 rex.W pushq \(%rax\)
+[ ]*[a-f0-9]+: 6a ff pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 6a ff pushw \$0xffff
+[ ]*[a-f0-9]+: 48 6a ff rex.W pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 66 48 6a ff data32 rex.W pushq \$0xffffffffffffffff
+[ ]*[a-f0-9]+: 68 01 02 03 04 pushq \$0x4030201
+[ ]*[a-f0-9]+: 66 68 01 02 pushw \$0x201
+[ ]*[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]+: 90 nop
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-stack.s b/gas/testsuite/gas/i386/x86-64-stack.s
index d114887..2da658b 100644
--- a/gas/testsuite/gas/i386/x86-64-stack.s
+++ b/gas/testsuite/gas/i386/x86-64-stack.s
@@ -22,3 +22,13 @@ _start:
try 0xff, 0xf0
try 0xff, 0x30
+
+ # push with a 1-byte immediate
+ try 0x6a, 0xff
+
+ # push with a 4-byte immediate
+ try 0x68, 0x01, 0x02, 0x03, 0x04
+
+ # This is just to synchronize the disassembly.
+ # Any new cases must come before this line!
+ nop