Browse Source
2008-04-10 H.J. Lu <hongjiu.lu@intel.com> * NEWS: Mention -msse-check=[none|error|warning]. * config/tc-i386.c (sse_check): New. (OPTION_MSSE_CHECK): Likewise. (md_assemble): Check SSE instructions if needed. (md_longopts): Add -msse-check. (md_parse_option): Handle OPTION_MSSE_CHECK. (md_show_usage): Show -msse-check=[none|error|warning]. * doc/c-i386.texi: Document -msse-check=[none|error|warning]. gas/testsuite/ 2008-04-10 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run sse-check, sse-check-warn, sse-check-error, x86-64-sse-check, x86-64-sse-check-warn and x86-64-sse-check-error. * gas/i386/sse-check.d: New. * gas/i386/sse-check.s: Likewise. * gas/i386/sse-check-error.l: Likewise. * gas/i386/sse-check-error.s: Likewise. * gas/i386/sse-check-warn.d: Likewise. * gas/i386/sse-check-warn.e: Likewise. * gas/i386/x86-64-sse-check.d: Likewise. * gas/i386/x86-64-sse-check-error.l: Likewise. * gas/i386/x86-64-sse-check-error.s: Likewise. * gas/i386/x86-64-sse-check-warn.d: Likewise.msnyder-reverse-20080609-branch
16 changed files with 266 additions and 0 deletions
@ -0,0 +1,40 @@ |
|||
.*: Assembler messages: |
|||
.*:7: Error: .* |
|||
.*:10: Error: .* |
|||
.*:13: Error: .* |
|||
.*:16: Error: .* |
|||
.*:19: Error: .* |
|||
.*:20: Error: .* |
|||
GAS LISTING .* |
|||
|
|||
|
|||
[ ]*1[ ]+\.include "sse-check\.s" |
|||
[ ]*1[ ]+\# Check SSE instructions |
|||
[ ]*2[ ]+ |
|||
[ ]*3[ ]+\.text |
|||
[ ]*4[ ]+_start: |
|||
[ ]*5[ ]+ |
|||
[ ]*6[ ]+\# SSE instruction |
|||
[ ]*7[ ]+\?\?\?\? 0F58CA addps %xmm2,%xmm1 |
|||
\*\*\*\* Error:SSE instruction `addps' is used |
|||
[ ]*8[ ]+ |
|||
[ ]*9[ ]+\# SSE2 instruction |
|||
[ ]*10[ ]+\?\?\?\? 660F58CA addpd %xmm2,%xmm1 |
|||
\*\*\*\* Error:SSE instruction `addpd' is used |
|||
[ ]*11[ ]+ |
|||
[ ]*12[ ]+\# SSE3 instruction |
|||
[ ]*13[ ]+\?\?\?\? 660FD0CA addsubpd %xmm2,%xmm1 |
|||
\*\*\*\* Error:SSE instruction `addsubpd' is used |
|||
[ ]*14[ ]+ |
|||
[ ]*15[ ]+\# SSSE3 instruction |
|||
[ ]*16[ ]+\?\?\?\? 660F3801 phaddw %xmm2,%xmm1 |
|||
\*\*\*\* Error:SSE instruction `phaddw' is used |
|||
[ ]*16[ ]+CA |
|||
[ ]*17[ ]+ |
|||
[ ]*18[ ]+\# SSE4 instructions |
|||
[ ]*19[ ]+\?\?\?\? 660F3815 blendvpd %xmm0,%xmm1,%xmm0 |
|||
\*\*\*\* Error:SSE instruction `blendvpd' is used |
|||
[ ]*19[ ]+C1 |
|||
[ ]*20[ ]+\?\?\?\? 660F3837 pcmpgtq %xmm1,%xmm0 |
|||
\*\*\*\* Error:SSE instruction `pcmpgtq' is used |
|||
[ ]*20[ ]+C1 |
|||
@ -0,0 +1 @@ |
|||
.include "sse-check.s" |
|||
@ -0,0 +1,18 @@ |
|||
#source: sse-check.s |
|||
#as: -msse-check=warning |
|||
#stderr: sse-check-warn.e |
|||
#objdump: -dw |
|||
#name: i386 SSE check (warning) |
|||
|
|||
.*: file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <_start>: |
|||
[ ]*[a-f0-9]+: 0f 58 ca addps %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 58 ca addpd %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f d0 ca addsubpd %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 38 01 ca phaddw %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 38 15 c1 blendvpd %xmm0,%xmm1,%xmm0 |
|||
[ ]*[a-f0-9]+: 66 0f 38 37 c1 pcmpgtq %xmm1,%xmm0 |
|||
#pass |
|||
@ -0,0 +1,7 @@ |
|||
.*: Assembler messages: |
|||
.*:7: Warning: SSE instruction `addps' is used |
|||
.*:10: Warning: SSE instruction `addpd' is used |
|||
.*:13: Warning: SSE instruction `addsubpd' is used |
|||
.*:16: Warning: SSE instruction `phaddw' is used |
|||
.*:19: Warning: SSE instruction `blendvpd' is used |
|||
.*:20: Warning: SSE instruction `pcmpgtq' is used |
|||
@ -0,0 +1,16 @@ |
|||
#as: -msse-check=none |
|||
#objdump: -dw |
|||
#name: i386 SSE check (none) |
|||
|
|||
.*: file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <_start>: |
|||
[ ]*[a-f0-9]+: 0f 58 ca addps %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 58 ca addpd %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f d0 ca addsubpd %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 38 01 ca phaddw %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 38 15 c1 blendvpd %xmm0,%xmm1,%xmm0 |
|||
[ ]*[a-f0-9]+: 66 0f 38 37 c1 pcmpgtq %xmm1,%xmm0 |
|||
#pass |
|||
@ -0,0 +1,20 @@ |
|||
# Check SSE instructions |
|||
|
|||
.text |
|||
_start: |
|||
|
|||
# SSE instruction |
|||
addps %xmm2,%xmm1 |
|||
|
|||
# SSE2 instruction |
|||
addpd %xmm2,%xmm1 |
|||
|
|||
# SSE3 instruction |
|||
addsubpd %xmm2,%xmm1 |
|||
|
|||
# SSSE3 instruction |
|||
phaddw %xmm2,%xmm1 |
|||
|
|||
# SSE4 instructions |
|||
blendvpd %xmm0,%xmm1,%xmm0 |
|||
pcmpgtq %xmm1,%xmm0 |
|||
@ -0,0 +1,40 @@ |
|||
.*: Assembler messages: |
|||
.*:7: Error: .* |
|||
.*:10: Error: .* |
|||
.*:13: Error: .* |
|||
.*:16: Error: .* |
|||
.*:19: Error: .* |
|||
.*:20: Error: .* |
|||
GAS LISTING .* |
|||
|
|||
|
|||
[ ]*1[ ]+\.include "sse-check\.s" |
|||
[ ]*1[ ]+\# Check SSE instructions |
|||
[ ]*2[ ]+ |
|||
[ ]*3[ ]+\.text |
|||
[ ]*4[ ]+_start: |
|||
[ ]*5[ ]+ |
|||
[ ]*6[ ]+\# SSE instruction |
|||
[ ]*7[ ]+\?\?\?\? 0F58CA addps %xmm2,%xmm1 |
|||
\*\*\*\* Error:SSE instruction `addps' is used |
|||
[ ]*8[ ]+ |
|||
[ ]*9[ ]+\# SSE2 instruction |
|||
[ ]*10[ ]+\?\?\?\? 660F58CA addpd %xmm2,%xmm1 |
|||
\*\*\*\* Error:SSE instruction `addpd' is used |
|||
[ ]*11[ ]+ |
|||
[ ]*12[ ]+\# SSE3 instruction |
|||
[ ]*13[ ]+\?\?\?\? 660FD0CA addsubpd %xmm2,%xmm1 |
|||
\*\*\*\* Error:SSE instruction `addsubpd' is used |
|||
[ ]*14[ ]+ |
|||
[ ]*15[ ]+\# SSSE3 instruction |
|||
[ ]*16[ ]+\?\?\?\? 660F3801 phaddw %xmm2,%xmm1 |
|||
\*\*\*\* Error:SSE instruction `phaddw' is used |
|||
[ ]*16[ ]+CA |
|||
[ ]*17[ ]+ |
|||
[ ]*18[ ]+\# SSE4 instructions |
|||
[ ]*19[ ]+\?\?\?\? 660F3815 blendvpd %xmm0,%xmm1,%xmm0 |
|||
\*\*\*\* Error:SSE instruction `blendvpd' is used |
|||
[ ]*19[ ]+C1 |
|||
[ ]*20[ ]+\?\?\?\? 660F3837 pcmpgtq %xmm1,%xmm0 |
|||
\*\*\*\* Error:SSE instruction `pcmpgtq' is used |
|||
[ ]*20[ ]+C1 |
|||
@ -0,0 +1 @@ |
|||
.include "sse-check.s" |
|||
@ -0,0 +1,18 @@ |
|||
#source: sse-check.s |
|||
#as: -msse-check=warning |
|||
#stderr: sse-check-warn.e |
|||
#objdump: -dw |
|||
#name: x86-64 SSE check (warning) |
|||
|
|||
.*: file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <_start>: |
|||
[ ]*[a-f0-9]+: 0f 58 ca addps %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 58 ca addpd %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f d0 ca addsubpd %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 38 01 ca phaddw %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 38 15 c1 blendvpd %xmm0,%xmm1,%xmm0 |
|||
[ ]*[a-f0-9]+: 66 0f 38 37 c1 pcmpgtq %xmm1,%xmm0 |
|||
#pass |
|||
@ -0,0 +1,17 @@ |
|||
#source: sse-check.s |
|||
#as: -msse-check=none |
|||
#objdump: -dw |
|||
#name: x86-64 SSE check (none) |
|||
|
|||
.*: file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <_start>: |
|||
[ ]*[a-f0-9]+: 0f 58 ca addps %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 58 ca addpd %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f d0 ca addsubpd %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 38 01 ca phaddw %xmm2,%xmm1 |
|||
[ ]*[a-f0-9]+: 66 0f 38 15 c1 blendvpd %xmm0,%xmm1,%xmm0 |
|||
[ ]*[a-f0-9]+: 66 0f 38 37 c1 pcmpgtq %xmm1,%xmm0 |
|||
#pass |
|||
Loading…
Reference in new issue