diff options
author | Jan Beulich <jbeulich@suse.com> | 2020-07-15 08:54:40 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2020-07-15 08:54:40 +0200 |
commit | e2e018c340310c0cd13f72d3dc8f6465936c5443 (patch) | |
tree | 15872a108b5b4feb57e52cac725e6405f7e0b391 /gas | |
parent | 36938cabf0efcb053d1585e8580a4b3db438ca4e (diff) | |
download | gdb-e2e018c340310c0cd13f72d3dc8f6465936c5443.zip gdb-e2e018c340310c0cd13f72d3dc8f6465936c5443.tar.gz gdb-e2e018c340310c0cd13f72d3dc8f6465936c5443.tar.bz2 |
x86-64: adjust stack insn test case
The value chosen for the 16-/32-bit immediate cases didn't work well
with the subsequent insn's REX prefix - we ought to pick a value the
upper two bytes of which evaluate to a 2-byte insn. Bump the values
accordingly, allowing the subsequent insn to actually have the intended
REX.W.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-stack-intel.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-stack-suffix.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-stack.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-stack.s | 4 |
5 files changed, 25 insertions, 17 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index e710045..76e1751 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,13 @@ 2020-07-15 Jan Beulich <jbeulich@suse.com> + * testsuite/gas/i386/x86-64-stack.s: Adjust 32-bit push + immediate. + * testsuite/gas/i386/x86-64-stack-intel.d, + testsuite/gas/i386/x86-64-stack-suffix.d, + testsuite/gas/i386/x86-64-stack.d: Adjust expectations. + +2020-07-15 Jan Beulich <jbeulich@suse.com> + * testsuite/gas/i386/disassem.d, testsuite/gas/i386/ilp32/x86-64-branch.d, testsuite/gas/i386/intel.d, testsuite/gas/i386/jump16.d, diff --git a/gas/testsuite/gas/i386/x86-64-stack-intel.d b/gas/testsuite/gas/i386/x86-64-stack-intel.d index b392579..5afada1 100644 --- a/gas/testsuite/gas/i386/x86-64-stack-intel.d +++ b/gas/testsuite/gas/i386/x86-64-stack-intel.d @@ -51,11 +51,11 @@ Disassembly of section .text: [ ]*[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 data16 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 data16 rex.W push 0x4030201 +[ ]*[a-f0-9]+: 68 02 03 04 05 push 0x5040302 +[ ]*[a-f0-9]+: 66 68 02 03 pushw 0x302 +[ ]*[a-f0-9]+: 04 05 add al,0x5 +[ ]*[a-f0-9]+: 48 68 02 03 04 05 rex\.W push 0x5040302 +[ ]*[a-f0-9]+: 66 48 68 02 03 04 05 data16 rex\.W push 0x5040302 [ ]*[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 diff --git a/gas/testsuite/gas/i386/x86-64-stack-suffix.d b/gas/testsuite/gas/i386/x86-64-stack-suffix.d index 7c52e10..0c3a966 100644 --- a/gas/testsuite/gas/i386/x86-64-stack-suffix.d +++ b/gas/testsuite/gas/i386/x86-64-stack-suffix.d @@ -51,11 +51,11 @@ Disassembly of section .text: [ ]*[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 data16 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 data16 rex.W pushq \$0x4030201 +[ ]*[a-f0-9]+: 68 02 03 04 05 pushq \$0x5040302 +[ ]*[a-f0-9]+: 66 68 02 03 pushw \$0x302 +[ ]*[a-f0-9]+: 04 05 addb \$0x5,%al +[ ]*[a-f0-9]+: 48 68 02 03 04 05 rex\.W pushq \$0x5040302 +[ ]*[a-f0-9]+: 66 48 68 02 03 04 05 data16 rex\.W pushq \$0x5040302 [ ]*[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 diff --git a/gas/testsuite/gas/i386/x86-64-stack.d b/gas/testsuite/gas/i386/x86-64-stack.d index 34312cd..c77b344 100644 --- a/gas/testsuite/gas/i386/x86-64-stack.d +++ b/gas/testsuite/gas/i386/x86-64-stack.d @@ -50,11 +50,11 @@ Disassembly of section .text: [ ]*[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 data16 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 \(%rax,%rcx,2\),%eax -[ ]*[a-f0-9]+: 68 01 02 03 04 push \$0x4030201 -[ ]*[a-f0-9]+: 66 48 68 01 02 03 04 data16 rex\.W push \$0x4030201 +[ ]*[a-f0-9]+: 68 02 03 04 05 push \$0x5040302 +[ ]*[a-f0-9]+: 66 68 02 03 pushw \$0x302 +[ ]*[a-f0-9]+: 04 05 add \$0x5,%al +[ ]*[a-f0-9]+: 48 68 02 03 04 05 rex\.W push \$0x5040302 +[ ]*[a-f0-9]+: 66 48 68 02 03 04 05 data16 rex\.W push \$0x5040302 [ ]*[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 diff --git a/gas/testsuite/gas/i386/x86-64-stack.s b/gas/testsuite/gas/i386/x86-64-stack.s index 0b8707e..0aa2ce9 100644 --- a/gas/testsuite/gas/i386/x86-64-stack.s +++ b/gas/testsuite/gas/i386/x86-64-stack.s @@ -26,8 +26,8 @@ _start: # push with a 1-byte immediate try 0x6a, 0xff - # push with a 4-byte immediate - try 0x68, 0x01, 0x02, 0x03, 0x04 + # push with a 4-(or 2-)byte immediate + try 0x68, 0x02, 0x03, 0x04, 0x05 # push a segment register try 0x0f, 0xa8 |