diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2008-01-12 16:05:42 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2008-01-12 16:05:42 +0000 |
commit | 7d5e4556a3758391b91ded9def373cee6992d163 (patch) | |
tree | d62d45db10cfae346bac2a825cd6a75be78cc8c0 /gas/testsuite | |
parent | b17828ca41d4e1cc14129b4760b4b8c35881d589 (diff) | |
download | gdb-7d5e4556a3758391b91ded9def373cee6992d163.zip gdb-7d5e4556a3758391b91ded9def373cee6992d163.tar.gz gdb-7d5e4556a3758391b91ded9def373cee6992d163.tar.bz2 |
gas/testsuite/
2008-01-12 H.J. Lu <hongjiu.lu@intel.com>
PR gas/5534
* gas/i386/i386.s: Add tests for fnstsw and fstsw.
* gas/i386/inval.s: Likewise.
* gas/i386/x86_64.s: Likewise.
* gas/i386/intel.s: Use word instead of dword on ss.
* gas/i386/x86-64-inval.s: Add tests for fnstsw, fstsw, in
and out.
* gas/i386/prefix.s: Remove invalid fstsw.
* gas/i386/inval.l: Updated.
* gas/i386/intelbad.l: Likewise.
* gas/i386/i386.d: Likewise.
* gas/i386/x86_64.d: Likewise.
* gas/i386/x86-64-inval.l: Likewise.
* gas/i386/prefix.d: Updated.
gas/
2008-01-12 H.J. Lu <hongjiu.lu@intel.com>
PR gas/5534
* config/tc-i386.c (_i386_insn): Update comment.
(operand_type_match): Also clear unspecified.
(operand_type_register_match): Likewise.
(parse_operands): Initialize unspecified.
(i386_intel_operand): Likewise.
(match_template): Check memory and accumulator operand size.
(i386_att_operand): Clear unspecified on register operand.
(intel_e11): Likewise.
(intel_e09): Set operand size and clean unspecified for
"XXX PTR".
opcodes/
2008-01-12 H.J. Lu <hongjiu.lu@intel.com>
PR gas/5534
* i386-gen.c (operand_type_init): Add Dword to
OPERAND_TYPE_ACC32. Add Qword to OPERAND_TYPE_ACC64.
(opcode_modifiers): Remove CheckSize, Byte, Word, Dword,
Qword and Xmmword.
(operand_types): Add Byte, Word, Dword, Fword, Qword, Tbyte,
Xmmword, Unspecified and Anysize.
(set_bitfield): Make Mmword an alias of Qword. Make Oword
an alias of Xmmword.
* i386-opc.h (CheckSize): Removed.
(Byte): Updated.
(Word): Likewise.
(Dword): Likewise.
(Qword): Likewise.
(Xmmword): Likewise.
(FWait): Updated.
(OTMax): Likewise.
(i386_opcode_modifier): Remove checksize, byte, word, dword,
qword and xmmword.
(Fword): New.
(TBYTE): Likewise.
(Unspecified): Likewise.
(Anysize): Likewise.
(i386_operand_type): Add byte, word, dword, fword, qword,
tbyte xmmword, unspecified and anysize.
* i386-opc.tbl: Updated to use Byte, Word, Dword, Fword, Qword,
Tbyte, Xmmword, Unspecified and Anysize.
* i386-reg.tbl: Add size for accumulator.
* i386-init.h: Regenerated.
* i386-tbl.h: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.s | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intel.s | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intelbad.l | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/inval.l | 48 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/inval.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/prefix.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/prefix.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-inval.l | 49 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-inval.s | 13 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86_64.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86_64.s | 13 |
13 files changed, 170 insertions, 36 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 4a2d55c..60c8fee 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,24 @@ +2008-01-12 H.J. Lu <hongjiu.lu@intel.com> + + PR gas/5534 + * gas/i386/i386.s: Add tests for fnstsw and fstsw. + * gas/i386/inval.s: Likewise. + * gas/i386/x86_64.s: Likewise. + + * gas/i386/intel.s: Use word instead of dword on ss. + + * gas/i386/x86-64-inval.s: Add tests for fnstsw, fstsw, in + and out. + + * gas/i386/prefix.s: Remove invalid fstsw. + + * gas/i386/inval.l: Updated. + * gas/i386/intelbad.l: Likewise. + * gas/i386/i386.d: Likewise. + * gas/i386/x86_64.d: Likewise. + * gas/i386/x86-64-inval.l: Likewise. + * gas/i386/prefix.d: Updated. + 2008-01-10 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/nops.s: Add more tests with opcodes from 0x0f19 diff --git a/gas/testsuite/gas/i386/i386.d b/gas/testsuite/gas/i386/i386.d index ddfc522..d5a23c1 100644 --- a/gas/testsuite/gas/i386/i386.d +++ b/gas/testsuite/gas/i386/i386.d @@ -6,6 +6,10 @@ Disassembly of section .text: 0+ <.*>: +[ ]*[a-f0-9]+: df e0 fnstsw %ax +[ ]*[a-f0-9]+: df e0 fnstsw %ax +[ ]*[a-f0-9]+: 9b df e0 fstsw %ax +[ ]*[a-f0-9]+: 9b df e0 fstsw %ax [ ]*[a-f0-9]+: 0f be 10 movsbl \(%eax\),%edx [ ]*[a-f0-9]+: 66 0f be 10 movsbw \(%eax\),%dx [ ]*[a-f0-9]+: 0f be 10 movsbl \(%eax\),%edx @@ -19,6 +23,10 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f b6 10 movzbl \(%eax\),%edx [ ]*[a-f0-9]+: 66 0f b6 10 movzbw \(%eax\),%dx [ ]*[a-f0-9]+: 0f b7 10 movzwl \(%eax\),%edx +[ ]*[a-f0-9]+: df e0 fnstsw %ax +[ ]*[a-f0-9]+: df e0 fnstsw %ax +[ ]*[a-f0-9]+: 9b df e0 fstsw %ax +[ ]*[a-f0-9]+: 9b df e0 fstsw %ax [ ]*[a-f0-9]+: 0f be 10 movsbl \(%eax\),%edx [ ]*[a-f0-9]+: 66 0f be 10 movsbw \(%eax\),%dx [ ]*[a-f0-9]+: 0f bf 10 movswl \(%eax\),%edx diff --git a/gas/testsuite/gas/i386/i386.s b/gas/testsuite/gas/i386/i386.s index 8eb5e53..cee44a6 100644 --- a/gas/testsuite/gas/i386/i386.s +++ b/gas/testsuite/gas/i386/i386.s @@ -1,6 +1,11 @@ # i386 instructions .text + fnstsw + fnstsw %ax + fstsw + fstsw %ax + movsx (%eax), %edx movsx (%eax), %dx movsbl (%eax), %edx @@ -17,6 +22,11 @@ movzwl (%eax), %edx .intel_syntax noprefix + fnstsw + fnstsw ax + fstsw + fstsw ax + movsx edx,BYTE PTR [eax] movsx dx,BYTE PTR [eax] movsx edx,WORD PTR [eax] diff --git a/gas/testsuite/gas/i386/intel.s b/gas/testsuite/gas/i386/intel.s index 855b419..6b42343 100644 --- a/gas/testsuite/gas/i386/intel.s +++ b/gas/testsuite/gas/i386/intel.s @@ -131,9 +131,9 @@ foo: mov 0x90909090[eax], edx mov dl, 0x90909090[eax] mov edx, 0x90909090[eax] - mov dword ptr 0x90909090[eax], ss + mov word ptr 0x90909090[eax], ss lea edx, 0x90909090[eax] - mov ss, dword ptr 0x90909090[eax] + mov ss, word ptr 0x90909090[eax] pop dword ptr 0x90909090[eax] xchg eax, eax xchg ecx, eax diff --git a/gas/testsuite/gas/i386/intelbad.l b/gas/testsuite/gas/i386/intelbad.l index 198420a..e3557dd 100644 --- a/gas/testsuite/gas/i386/intelbad.l +++ b/gas/testsuite/gas/i386/intelbad.l @@ -3,10 +3,18 @@ .*:5: Error: .* .*:6: Error: .* .*:7: Error: .* +.*:8: Error: .* +.*:9: Error: .* .*:10: Error: .* +.*:11: Error: .* +.*:12: Error: .* .*:13: Error: .* +.*:14: Error: .* .*:15: Error: .* +.*:16: Error: .* +.*:17: Error: .* .*:18: Error: .* +.*:19: Error: .* .*:20: Error: .* .*:21: Error: .* .*:22: Error: .* @@ -50,7 +58,16 @@ .*:60: Error: .* .*:61: Error: .* .*:62: Error: .* +.*:63: Error: .* +.*:64: Error: .* +.*:65: Error: .* +.*:66: Error: .* .*:67: Error: .* +.*:68: Error: .* +.*:69: Error: .* +.*:70: Error: .* +.*:71: Error: .* +.*:72: Error: .* .*:73: Error: .* .*:74: Error: .* .*:75: Error: .* diff --git a/gas/testsuite/gas/i386/inval.l b/gas/testsuite/gas/i386/inval.l index 94f3c08..53616b8 100644 --- a/gas/testsuite/gas/i386/inval.l +++ b/gas/testsuite/gas/i386/inval.l @@ -49,10 +49,10 @@ .*:50: Error: .* .*:51: Error: .* .*:52: Error: .* +.*:53: Error: .* +.*:54: Error: .* .*:55: Error: .* .*:56: Error: .* -.*:57: Error: .* -.*:58: Error: .* .*:59: Error: .* .*:60: Error: .* .*:61: Error: .* @@ -61,6 +61,14 @@ .*:64: Error: .* .*:65: Error: .* .*:66: Error: .* +.*:67: Error: .* +.*:68: Error: .* +.*:69: Error: .* +.*:70: Error: .* +.*:71: Error: .* +.*:72: Error: .* +.*:73: Error: .* +.*:74: Error: .* GAS LISTING .* @@ -116,20 +124,28 @@ GAS LISTING .* [ ]*50[ ]+insertq \$4,\$2,%xmm2,%ebx [ ]*51[ ]+cvtsi2ssq \(%eax\),%xmm1 [ ]*52[ ]+cvtsi2sdq \(%eax\),%xmm1 -[ ]*53[ ]+ -[ ]*54[ ]+\.intel_syntax noprefix -[ ]*55[ ]+cvtsi2ss xmm1,QWORD PTR \[eax\] -[ ]*56[ ]+cvtsi2sd xmm1,QWORD PTR \[eax\] -[ ]*57[ ]+cvtsi2ssq xmm1,QWORD PTR \[eax\] +[ ]*53[ ]+fnstsw %eax +[ ]*54[ ]+fnstsw %al +[ ]*55[ ]+fstsw %eax +[ ]*56[ ]+fstsw %al +[ ]*57[ ]+ GAS LISTING .* -[ ]*58[ ]+cvtsi2sdq xmm1,QWORD PTR \[eax\] -[ ]*59[ ]+movq xmm1, XMMWORD PTR \[esp\] -[ ]*60[ ]+movq xmm1, DWORD PTR \[esp\] -[ ]*61[ ]+movq xmm1, WORD PTR \[esp\] -[ ]*62[ ]+movq xmm1, BYTE PTR \[esp\] -[ ]*63[ ]+movq XMMWORD PTR \[esp\],xmm1 -[ ]*64[ ]+movq DWORD PTR \[esp\],xmm1 -[ ]*65[ ]+movq WORD PTR \[esp\],xmm1 -[ ]*66[ ]+movq BYTE PTR \[esp\],xmm1 +[ ]*58[ ]+\.intel_syntax noprefix +[ ]*59[ ]+cvtsi2ss xmm1,QWORD PTR \[eax\] +[ ]*60[ ]+cvtsi2sd xmm1,QWORD PTR \[eax\] +[ ]*61[ ]+cvtsi2ssq xmm1,QWORD PTR \[eax\] +[ ]*62[ ]+cvtsi2sdq xmm1,QWORD PTR \[eax\] +[ ]*63[ ]+movq xmm1, XMMWORD PTR \[esp\] +[ ]*64[ ]+movq xmm1, DWORD PTR \[esp\] +[ ]*65[ ]+movq xmm1, WORD PTR \[esp\] +[ ]*66[ ]+movq xmm1, BYTE PTR \[esp\] +[ ]*67[ ]+movq XMMWORD PTR \[esp\],xmm1 +[ ]*68[ ]+movq DWORD PTR \[esp\],xmm1 +[ ]*69[ ]+movq WORD PTR \[esp\],xmm1 +[ ]*70[ ]+movq BYTE PTR \[esp\],xmm1 +[ ]*71[ ]+fnstsw eax +[ ]*72[ ]+fnstsw al +[ ]*73[ ]+fstsw eax +[ ]*74[ ]+fstsw al diff --git a/gas/testsuite/gas/i386/inval.s b/gas/testsuite/gas/i386/inval.s index 2584d0e..b966af3 100644 --- a/gas/testsuite/gas/i386/inval.s +++ b/gas/testsuite/gas/i386/inval.s @@ -50,6 +50,10 @@ foo: jaw foo insertq $4,$2,%xmm2,%ebx cvtsi2ssq (%eax),%xmm1 cvtsi2sdq (%eax),%xmm1 + fnstsw %eax + fnstsw %al + fstsw %eax + fstsw %al .intel_syntax noprefix cvtsi2ss xmm1,QWORD PTR [eax] @@ -64,3 +68,7 @@ foo: jaw foo movq DWORD PTR [esp],xmm1 movq WORD PTR [esp],xmm1 movq BYTE PTR [esp],xmm1 + fnstsw eax + fnstsw al + fstsw eax + fstsw al diff --git a/gas/testsuite/gas/i386/prefix.d b/gas/testsuite/gas/i386/prefix.d index 9021f09..0cb79ff 100644 --- a/gas/testsuite/gas/i386/prefix.d +++ b/gas/testsuite/gas/i386/prefix.d @@ -9,7 +9,6 @@ Disassembly of section .text: 0: 9b 26 67 d9 3c [ ]*addr16 fstcw %es:\(%si\) 5: 9b df e0 [ ]*fstsw %ax 8: 9b df e0 [ ]*fstsw %ax - b: 9b df e0 [ ]*fstsw %ax - e: 9b 67 df e0 [ ]*addr16 fstsw %ax - 12: 36 67 66 f3 a7 [ ]*repz addr16 cmpsw %es:\(%di\),%ss:\(%si\) + b: 9b 67 df e0 [ ]*addr16 fstsw %ax + f: 36 67 66 f3 a7 [ ]*repz addr16 cmpsw %es:\(%di\),%ss:\(%si\) #pass diff --git a/gas/testsuite/gas/i386/prefix.s b/gas/testsuite/gas/i386/prefix.s index 5cf55cd..a141ad5 100644 --- a/gas/testsuite/gas/i386/prefix.s +++ b/gas/testsuite/gas/i386/prefix.s @@ -1,5 +1,5 @@ .text ; foo: addr16 fstcw %es:(%si) - fstsw;fstsw %ax;fstsw %eax + fstsw; fstsw %ax; addr16 fstsw %ax ;addr16 rep cmpsw %es:(%di),%ss:(%si) # Get a good alignment. diff --git a/gas/testsuite/gas/i386/x86-64-inval.l b/gas/testsuite/gas/i386/x86-64-inval.l index dcc2f80..c567a13 100644 --- a/gas/testsuite/gas/i386/x86-64-inval.l +++ b/gas/testsuite/gas/i386/x86-64-inval.l @@ -49,15 +49,27 @@ .*:50: Error: .* .*:51: Error: .* .*:52: Error: .* +.*:53: Error: .* .*:54: Error: .* .*:55: Error: .* .*:56: Error: .* .*:57: Error: .* .*:58: Error: .* -.*:59: Error: .* -.*:60: Error: .* .*:61: Error: .* .*:62: Error: .* +.*:63: Error: .* +.*:64: Error: .* +.*:65: Error: .* +.*:66: Error: .* +.*:67: Error: .* +.*:68: Error: .* +.*:69: Error: .* +.*:70: Error: .* +.*:71: Error: .* +.*:72: Error: .* +.*:73: Error: .* +.*:74: Error: .* +.*:75: Error: .* GAS LISTING .* @@ -113,16 +125,29 @@ GAS LISTING .* [ ]*50[ ]+popfl \# can't have 32-bit stack operands [ ]*51[ ]+retl \# can't have 32-bit stack operands [ ]*52[ ]+insertq \$4,\$2,%xmm2,%ebx \# The last operand must be XMM register\. -[ ]*53[ ]+\.intel_syntax noprefix -[ ]*54[ ]+cmpxchg16b dword ptr \[rax\] \# Must be oword -[ ]*55[ ]+movq xmm1, XMMWORD PTR \[rsp\] -[ ]*56[ ]+movq xmm1, DWORD PTR \[rsp\] -[ ]*57[ ]+movq xmm1, WORD PTR \[rsp\] +[ ]*53[ ]+fnstsw %eax +[ ]*54[ ]+fnstsw %al +[ ]*55[ ]+fstsw %eax +[ ]*56[ ]+fstsw %al +[ ]*57[ ]+in \$8,%rax GAS LISTING .* -[ ]*58[ ]+movq xmm1, BYTE PTR \[rsp\] -[ ]*59[ ]+movq XMMWORD PTR \[rsp\],xmm1 -[ ]*60[ ]+movq DWORD PTR \[rsp\],xmm1 -[ ]*61[ ]+movq WORD PTR \[rsp\],xmm1 -[ ]*62[ ]+movq BYTE PTR \[rsp\],xmm1 +[ ]*58[ ]+out %rax,\$8 +[ ]*59[ ]+ +[ ]*60[ ]+\.intel_syntax noprefix +[ ]*61[ ]+cmpxchg16b dword ptr \[rax\] \# Must be oword +[ ]*62[ ]+movq xmm1, XMMWORD PTR \[rsp\] +[ ]*63[ ]+movq xmm1, DWORD PTR \[rsp\] +[ ]*64[ ]+movq xmm1, WORD PTR \[rsp\] +[ ]*65[ ]+movq xmm1, BYTE PTR \[rsp\] +[ ]*66[ ]+movq XMMWORD PTR \[rsp\],xmm1 +[ ]*67[ ]+movq DWORD PTR \[rsp\],xmm1 +[ ]*68[ ]+movq WORD PTR \[rsp\],xmm1 +[ ]*69[ ]+movq BYTE PTR \[rsp\],xmm1 +[ ]*70[ ]+fnstsw eax +[ ]*71[ ]+fnstsw al +[ ]*72[ ]+fstsw eax +[ ]*73[ ]+fstsw al +[ ]*74[ ]+in rax,8 +[ ]*75[ ]+out 8,rax diff --git a/gas/testsuite/gas/i386/x86-64-inval.s b/gas/testsuite/gas/i386/x86-64-inval.s index 979635f..30407e8 100644 --- a/gas/testsuite/gas/i386/x86-64-inval.s +++ b/gas/testsuite/gas/i386/x86-64-inval.s @@ -50,6 +50,13 @@ foo: jcxz foo # No prefix exists to select CX as a counter popfl # can't have 32-bit stack operands retl # can't have 32-bit stack operands insertq $4,$2,%xmm2,%ebx # The last operand must be XMM register. + fnstsw %eax + fnstsw %al + fstsw %eax + fstsw %al + in $8,%rax + out %rax,$8 + .intel_syntax noprefix cmpxchg16b dword ptr [rax] # Must be oword movq xmm1, XMMWORD PTR [rsp] @@ -60,3 +67,9 @@ foo: jcxz foo # No prefix exists to select CX as a counter movq DWORD PTR [rsp],xmm1 movq WORD PTR [rsp],xmm1 movq BYTE PTR [rsp],xmm1 + fnstsw eax + fnstsw al + fstsw eax + fstsw al + in rax,8 + out 8,rax diff --git a/gas/testsuite/gas/i386/x86_64.d b/gas/testsuite/gas/i386/x86_64.d index b21d0af..4e9536c 100644 --- a/gas/testsuite/gas/i386/x86_64.d +++ b/gas/testsuite/gas/i386/x86_64.d @@ -191,4 +191,12 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f3 0f 7e 0c 24 movq \(%rsp\),%xmm1 [ ]*[a-f0-9]+: 66 0f d6 0c 24 movq %xmm1,\(%rsp\) [ ]*[a-f0-9]+: 66 0f d6 0c 24 movq %xmm1,\(%rsp\) +[ ]*[a-f0-9]+: df e0 fnstsw %ax +[ ]*[a-f0-9]+: df e0 fnstsw %ax +[ ]*[a-f0-9]+: 9b df e0 fstsw %ax +[ ]*[a-f0-9]+: 9b df e0 fstsw %ax +[ ]*[a-f0-9]+: df e0 fnstsw %ax +[ ]*[a-f0-9]+: df e0 fnstsw %ax +[ ]*[a-f0-9]+: 9b df e0 fstsw %ax +[ ]*[a-f0-9]+: 9b df e0 fstsw %ax #pass diff --git a/gas/testsuite/gas/i386/x86_64.s b/gas/testsuite/gas/i386/x86_64.s index fbf4b31..d107b12 100644 --- a/gas/testsuite/gas/i386/x86_64.s +++ b/gas/testsuite/gas/i386/x86_64.s @@ -233,5 +233,14 @@ cmpxchg16b oword ptr [rax] movq QWORD PTR [rsp],xmm1 movq [rsp],xmm1 -# Get a good alignment. - .p2align 4,0 +.att_syntax + fnstsw + fnstsw %ax + fstsw + fstsw %ax + + .intel_syntax noprefix + fnstsw + fnstsw ax + fstsw + fstsw ax |