diff options
author | Jan Beulich <jbeulich@novell.com> | 2017-11-23 10:59:48 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2017-11-23 10:59:48 +0100 |
commit | 66f1eba0b7e83f293573ab42bbbe5d7d5c905d91 (patch) | |
tree | c0a4bdbe635820369185b8c48ec03c02928b765c /gas | |
parent | 38bf51134d1a58f155c89f2b1c7bf885c2604ead (diff) | |
download | gdb-66f1eba0b7e83f293573ab42bbbe5d7d5c905d91.zip gdb-66f1eba0b7e83f293573ab42bbbe5d7d5c905d91.tar.gz gdb-66f1eba0b7e83f293573ab42bbbe5d7d5c905d91.tar.bz2 |
x86: correct UDn
Make the assembler recognize UD0, supporting only the newer form
expecting a ModR/M byte.
Make assembler and disassembler properly emit / expect a ModR/M byte for
UD1.
For the testsuite, as arch-4 already tests all UDn, avoid producing a
huge delta for other tests using UD2B by making them use UD2 instead.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-4.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-4.s | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intel.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intel.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/opcode-intel.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/opcode-suffix.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/opcode.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/opcode.s | 2 |
9 files changed, 21 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 8b6f8f9..c002807 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,14 @@ 2017-11-23 Jan Beulich <jbeulich@suse.com> + * testsuite/gas/i386/arch-4.s: Correct ud1 and ud2b. Add ud0. + * testsuite/gas/i386/intel.s: Test ud2 instead of ud2b. + * testsuite/gas/i386/opcode.s: Likewise. + * testsuite/gas/i386/arch-4.d, testsuite/gas/i386/intel.d, + testsuite/gas/i386/opcode.d, testsuite/gas/i386/opcode-intel.d, + testsuite/gas/i386/opcode-suffix.d: Adjust expectations. + +2017-11-23 Jan Beulich <jbeulich@suse.com> + * config/tc-i386-intel.c (i386_intel_operand): Don't call as_bad() if a prior error was already reported. * testsuite/gas/i386/inval-avx512f.l, diff --git a/gas/testsuite/gas/i386/arch-4.d b/gas/testsuite/gas/i386/arch-4.d index 05375d7..dc2c05d 100644 --- a/gas/testsuite/gas/i386/arch-4.d +++ b/gas/testsuite/gas/i386/arch-4.d @@ -1,4 +1,3 @@ -#as: -march=generic32 #objdump: -dw #name: i386 arch 4 @@ -7,8 +6,9 @@ Disassembly of section .text: 0+ <.text>: -[ ]*[a-f0-9]+: 0f b9 ud1 +[ ]*[a-f0-9]+: 0f ff 07 [ ]*ud0 \(%edi\),%eax +[ ]*[a-f0-9]+: 0f b9 07 [ ]*ud1 \(%edi\),%eax [ ]*[a-f0-9]+: 0f 0b ud2 [ ]*[a-f0-9]+: 0f 0b ud2 -[ ]*[a-f0-9]+: 0f b9 ud1 +[ ]*[a-f0-9]+: 0f b9 07 [ ]*ud1 \(%edi\),%eax #pass diff --git a/gas/testsuite/gas/i386/arch-4.s b/gas/testsuite/gas/i386/arch-4.s index 75d53bb..cf14d73 100644 --- a/gas/testsuite/gas/i386/arch-4.s +++ b/gas/testsuite/gas/i386/arch-4.s @@ -1,5 +1,6 @@ .text - ud1 + ud0 (%edi),%eax + ud1 (%edi),%eax ud2 ud2a - ud2b + ud2b (%edi),%eax diff --git a/gas/testsuite/gas/i386/intel.d b/gas/testsuite/gas/i386/intel.d index 836acd60..8401d10 100644 --- a/gas/testsuite/gas/i386/intel.d +++ b/gas/testsuite/gas/i386/intel.d @@ -360,7 +360,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f b5 90 90 90 90 90 [ ]*lgs -0x6f6f6f70\(%eax\),%edx [ ]*[a-f0-9]+: 0f b6 90 90 90 90 90 [ ]*movzbl -0x6f6f6f70\(%eax\),%edx [ ]*[a-f0-9]+: 0f b7 90 90 90 90 90 [ ]*movzwl -0x6f6f6f70\(%eax\),%edx -[ ]*[a-f0-9]+: 0f b9 [ ]*ud1 +[ ]*[a-f0-9]+: 0f 0b [ ]*ud2[ ]* [ ]*[a-f0-9]+: 0f bb 90 90 90 90 90 [ ]*btc %edx,-0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 0f bc 90 90 90 90 90 [ ]*bsf -0x6f6f6f70\(%eax\),%edx [ ]*[a-f0-9]+: 0f bd 90 90 90 90 90 [ ]*bsr -0x6f6f6f70\(%eax\),%edx diff --git a/gas/testsuite/gas/i386/intel.s b/gas/testsuite/gas/i386/intel.s index 813daaa..54249d3 100644 --- a/gas/testsuite/gas/i386/intel.s +++ b/gas/testsuite/gas/i386/intel.s @@ -353,7 +353,7 @@ foo: lgs edx, 0x90909090[eax] movzx edx, byte ptr 0x90909090[eax] movzx edx, word ptr 0x90909090[eax] - ud2b + ud2 btc 0x90909090[eax], edx bsf edx, 0x90909090[eax] bsr edx, 0x90909090[eax] diff --git a/gas/testsuite/gas/i386/opcode-intel.d b/gas/testsuite/gas/i386/opcode-intel.d index 404758c..434b0e3 100644 --- a/gas/testsuite/gas/i386/opcode-intel.d +++ b/gas/testsuite/gas/i386/opcode-intel.d @@ -358,7 +358,7 @@ Disassembly of section .text: *[0-9a-f]+: 0f b5 90 90 90 90 90[ ]+lgs[ ]+edx,(FWORD PTR )?\[eax-0x6f6f6f70\] *[0-9a-f]+: 0f b6 90 90 90 90 90[ ]+movzx[ ]+edx,BYTE PTR \[eax-0x6f6f6f70\] *[0-9a-f]+: 0f b7 90 90 90 90 90[ ]+movzx[ ]+edx,WORD PTR \[eax-0x6f6f6f70\] - *[0-9a-f]+: 0f b9[ ]+ud1[ ]* + *[0-9a-f]+: 0f 0b[ ]+ud2[ ]* *[0-9a-f]+: 0f bb 90 90 90 90 90[ ]+btc[ ]+(DWORD PTR )?\[eax-0x6f6f6f70\],edx *[0-9a-f]+: 0f bc 90 90 90 90 90[ ]+bsf[ ]+edx,(DWORD PTR )?\[eax-0x6f6f6f70\] *[0-9a-f]+: 0f bd 90 90 90 90 90[ ]+bsr[ ]+edx,(DWORD PTR )?\[eax-0x6f6f6f70\] diff --git a/gas/testsuite/gas/i386/opcode-suffix.d b/gas/testsuite/gas/i386/opcode-suffix.d index 1fdd58f..059a10c 100644 --- a/gas/testsuite/gas/i386/opcode-suffix.d +++ b/gas/testsuite/gas/i386/opcode-suffix.d @@ -358,7 +358,7 @@ Disassembly of section .text: *[0-9a-f]+: 0f b5 90 90 90 90 90[ ]+lgsl[ ]+-0x6f6f6f70\(%eax\),%edx *[0-9a-f]+: 0f b6 90 90 90 90 90[ ]+movzbl -0x6f6f6f70\(%eax\),%edx *[0-9a-f]+: 0f b7 90 90 90 90 90[ ]+movzwl -0x6f6f6f70\(%eax\),%edx - *[0-9a-f]+: 0f b9[ ]+ud1[ ]+ + *[0-9a-f]+: 0f 0b[ ]+ud2[ ]* *[0-9a-f]+: 0f bb 90 90 90 90 90[ ]+btcl[ ]+%edx,-0x6f6f6f70\(%eax\) *[0-9a-f]+: 0f bc 90 90 90 90 90[ ]+bsfl[ ]+-0x6f6f6f70\(%eax\),%edx *[0-9a-f]+: 0f bd 90 90 90 90 90[ ]+bsrl[ ]+-0x6f6f6f70\(%eax\),%edx diff --git a/gas/testsuite/gas/i386/opcode.d b/gas/testsuite/gas/i386/opcode.d index b80a78c..f2897ff 100644 --- a/gas/testsuite/gas/i386/opcode.d +++ b/gas/testsuite/gas/i386/opcode.d @@ -357,7 +357,7 @@ Disassembly of section .text: 57e: 0f b5 90 90 90 90 90 [ ]*lgs -0x6f6f6f70\(%eax\),%edx 585: 0f b6 90 90 90 90 90 [ ]*movzbl -0x6f6f6f70\(%eax\),%edx 58c: 0f b7 90 90 90 90 90 [ ]*movzwl -0x6f6f6f70\(%eax\),%edx - 593: 0f b9 [ ]*ud1 + 593: 0f 0b [ ]*ud2[ ]* 595: 0f bb 90 90 90 90 90 [ ]*btc %edx,-0x6f6f6f70\(%eax\) 59c: 0f bc 90 90 90 90 90 [ ]*bsf -0x6f6f6f70\(%eax\),%edx 5a3: 0f bd 90 90 90 90 90 [ ]*bsr -0x6f6f6f70\(%eax\),%edx diff --git a/gas/testsuite/gas/i386/opcode.s b/gas/testsuite/gas/i386/opcode.s index db47446..ca52111 100644 --- a/gas/testsuite/gas/i386/opcode.s +++ b/gas/testsuite/gas/i386/opcode.s @@ -350,7 +350,7 @@ foo: lgs 0x90909090(%eax),%edx movzbl 0x90909090(%eax),%edx movzwl 0x90909090(%eax),%edx - ud2b + ud2 btc %edx,0x90909090(%eax) bsf 0x90909090(%eax),%edx bsr 0x90909090(%eax),%edx |