diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-07-16 12:58:29 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-07-16 12:58:29 +0000 |
commit | e2e1fcde622f2f6cedfd7fb6615aa6e136f21dec (patch) | |
tree | 9ddc06661adc2b06aed7031d9eef15c39af4e2ca /gas/testsuite | |
parent | 094b34ac0b0bca39ecc6b7fd8a97934695079729 (diff) | |
download | gdb-e2e1fcde622f2f6cedfd7fb6615aa6e136f21dec.zip gdb-e2e1fcde622f2f6cedfd7fb6615aa6e136f21dec.tar.gz gdb-e2e1fcde622f2f6cedfd7fb6615aa6e136f21dec.tar.bz2 |
Implement RDRSEED, ADX and PRFCHW instructions
gas/
* config/tc-i386.c: Add ADX, RDSEED and PRFCHW asm directives.
* doc/c-i386.texi: Document the new directives.
gas/testsuite/
* gas/i386/i386.exp: Run adx, rdseed and prefetchw tests.
* gas/i386/x86-64-arch-2.s: Use prefetchw as 3dnow and Prfchw tests.
* gas/i386/arch-10.s: Likewise.
* gas/i386/arch-10-1.l: Changed correspondingly.
* gas/i386/arch-10-2.l: Likewise.
* gas/i386/arch-10-3.l: Likewise.
* gas/i386/arch-10-4.l: Likewise.
* gas/i386/arch-10.d: Likewise.
* gas/i386/arch-10-lzcnt.d: Likewise.
* gas/i386/x86-64-arch-2.d: Likewise.
* gas/i386/x86-64-arch-2-lzcnt.d: Likewise.
* gas/i386/ilp32/x86-64-arch-2.d: Likewise.
* gas/i386/arch-10-prefetchw.d: New file.
* gas/i386/x86-64-arch-2-prefetchw.d: Likewise.
* gas/i386/rdseed.s: Likewise.
* gas/i386/rdseed.d: Likewise.
* gas/i386/rdseed-intel.d: Likewise.
* gas/i386/adx.s: Likewise.
* gas/i386/adx.d: Likewise.
* gas/i386/adx-intel.d: Likewise.
* gas/i386/x86-64-rdseed.s: Likewise.
* gas/i386/x86-64-rdseed.d: Likewise.
* gas/i386/x86-64-rdseed-intel.d: Likewise.
* gas/i386/x86-64-adx.s: Likewise.
* gas/i386/x86-64-adx.d: Likewise.
* gas/i386/x86-64-adx-intel.d: Likewise.
opcodes/
* i386-dis.c (PREFIX_0F38F6): New.
(prefix_table): Add adcx, adox instructions.
(three_byte_table): Use PREFIX_0F38F6.
(mod_table): Add rdseed instruction.
* i386-gen.c (cpu_flag_init): Add CpuADX, CpuRDSEED, CpuPRFCHW.
(cpu_flags): Likewise.
* i386-opc.h: Add CpuADX, CpuRDSEED, CpuPRFCHW.
(i386_cpu_flags): Add fields cpurdseed, cpuadx, cpuprfchw.
* i386-opc.tbl: Add instrcutions adcx, adox, rdseed. Extend
prefetchw.
* i386-tbl.h: Regenerate.
* i386-init.h: Likewise.
Diffstat (limited to 'gas/testsuite')
27 files changed, 541 insertions, 94 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index a55d25e..756b9d2 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,32 @@ +2012-07-16 Michael Zolotukhin <michael.v.zolotukhin@intel.com> + + * gas/i386/i386.exp: Run adx, rdseed and prefetchw tests. + * gas/i386/x86-64-arch-2.s: Use prefetchw as 3dnow and Prfchw tests. + * gas/i386/arch-10.s: Likewise. + * gas/i386/arch-10-1.l: Changed correspondingly. + * gas/i386/arch-10-2.l: Likewise. + * gas/i386/arch-10-3.l: Likewise. + * gas/i386/arch-10-4.l: Likewise. + * gas/i386/arch-10.d: Likewise. + * gas/i386/arch-10-lzcnt.d: Likewise. + * gas/i386/x86-64-arch-2.d: Likewise. + * gas/i386/x86-64-arch-2-lzcnt.d: Likewise. + * gas/i386/ilp32/x86-64-arch-2.d: Likewise. + * gas/i386/arch-10-prefetchw.d: New file. + * gas/i386/x86-64-arch-2-prefetchw.d: Likewise. + * gas/i386/rdseed.s: Likewise. + * gas/i386/rdseed.d: Likewise. + * gas/i386/rdseed-intel.d: Likewise. + * gas/i386/adx.s: Likewise. + * gas/i386/adx.d: Likewise. + * gas/i386/adx-intel.d: Likewise. + * gas/i386/x86-64-rdseed.s: Likewise. + * gas/i386/x86-64-rdseed.d: Likewise. + * gas/i386/x86-64-rdseed-intel.d: Likewise. + * gas/i386/x86-64-adx.s: Likewise. + * gas/i386/x86-64-adx.d: Likewise. + * gas/i386/x86-64-adx-intel.d: Likewise. + 2012-07-02 Roland McGrath <mcgrathr@google.com> * gas/i386/rep-suffix.s: Add 'rep nop' case. diff --git a/gas/testsuite/gas/i386/adx-intel.d b/gas/testsuite/gas/i386/adx-intel.d new file mode 100644 index 0000000..cf356d5 --- /dev/null +++ b/gas/testsuite/gas/i386/adx-intel.d @@ -0,0 +1,31 @@ +#objdump: -dwMintel +#name: i386 ADX (Intel disassembly) +#source: adx.s + +.*: +file format .* + + +Disassembly of section .text: + +0+ <_start>: +[ ]*[a-f0-9]+: 66 0f 38 f6 81 90 01 00 00 adcx eax,DWORD PTR \[ecx\+0x190\] +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx ecx,edx +[ ]*[a-f0-9]+: 66 0f 38 f6 94 f4 0f 04 f6 ff adcx edx,DWORD PTR \[esp\+esi\*8-0x9fbf1\] +[ ]*[a-f0-9]+: 66 0f 38 f6 00 adcx eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx ecx,edx +[ ]*[a-f0-9]+: 66 0f 38 f6 00 adcx eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: f3 0f 38 f6 81 90 01 00 00 adox eax,DWORD PTR \[ecx\+0x190\] +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox ecx,edx +[ ]*[a-f0-9]+: f3 0f 38 f6 94 f4 0f 04 f6 ff adox edx,DWORD PTR \[esp\+esi\*8-0x9fbf1\] +[ ]*[a-f0-9]+: f3 0f 38 f6 00 adox eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox ecx,edx +[ ]*[a-f0-9]+: f3 0f 38 f6 00 adox eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 f6 82 8f 01 00 00 adcx eax,DWORD PTR \[edx\+0x18f\] +[ ]*[a-f0-9]+: 66 0f 38 f6 d1 adcx edx,ecx +[ ]*[a-f0-9]+: 66 0f 38 f6 94 f4 c0 1d fe ff adcx edx,DWORD PTR \[esp\+esi\*8-0x1e240\] +[ ]*[a-f0-9]+: 66 0f 38 f6 00 adcx eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: f3 0f 38 f6 82 8f 01 00 00 adox eax,DWORD PTR \[edx\+0x18f\] +[ ]*[a-f0-9]+: f3 0f 38 f6 d1 adox edx,ecx +[ ]*[a-f0-9]+: f3 0f 38 f6 94 f4 c0 1d fe ff adox edx,DWORD PTR \[esp\+esi\*8-0x1e240\] +[ ]*[a-f0-9]+: f3 0f 38 f6 00 adox eax,DWORD PTR \[eax\] +#pass diff --git a/gas/testsuite/gas/i386/adx.d b/gas/testsuite/gas/i386/adx.d new file mode 100644 index 0000000..1269c7c --- /dev/null +++ b/gas/testsuite/gas/i386/adx.d @@ -0,0 +1,30 @@ +#objdump: -dw +#name: i386 ADX + +.*: +file format .* + + +Disassembly of section .text: + +0+ <_start>: +[ ]*[a-f0-9]+: 66 0f 38 f6 81 90 01 00 00 adcx 0x190\(%ecx\),%eax +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx %edx,%ecx +[ ]*[a-f0-9]+: 66 0f 38 f6 94 f4 0f 04 f6 ff adcx -0x9fbf1\(%esp,%esi,8\),%edx +[ ]*[a-f0-9]+: 66 0f 38 f6 00 adcx \(%eax\),%eax +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx %edx,%ecx +[ ]*[a-f0-9]+: 66 0f 38 f6 00 adcx \(%eax\),%eax +[ ]*[a-f0-9]+: f3 0f 38 f6 81 90 01 00 00 adox 0x190\(%ecx\),%eax +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox %edx,%ecx +[ ]*[a-f0-9]+: f3 0f 38 f6 94 f4 0f 04 f6 ff adox -0x9fbf1\(%esp,%esi,8\),%edx +[ ]*[a-f0-9]+: f3 0f 38 f6 00 adox \(%eax\),%eax +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox %edx,%ecx +[ ]*[a-f0-9]+: f3 0f 38 f6 00 adox \(%eax\),%eax +[ ]*[a-f0-9]+: 66 0f 38 f6 82 8f 01 00 00 adcx 0x18f\(%edx\),%eax +[ ]*[a-f0-9]+: 66 0f 38 f6 d1 adcx %ecx,%edx +[ ]*[a-f0-9]+: 66 0f 38 f6 94 f4 c0 1d fe ff adcx -0x1e240\(%esp,%esi,8\),%edx +[ ]*[a-f0-9]+: 66 0f 38 f6 00 adcx \(%eax\),%eax +[ ]*[a-f0-9]+: f3 0f 38 f6 82 8f 01 00 00 adox 0x18f\(%edx\),%eax +[ ]*[a-f0-9]+: f3 0f 38 f6 d1 adox %ecx,%edx +[ ]*[a-f0-9]+: f3 0f 38 f6 94 f4 c0 1d fe ff adox -0x1e240\(%esp,%esi,8\),%edx +[ ]*[a-f0-9]+: f3 0f 38 f6 00 adox \(%eax\),%eax +#pass diff --git a/gas/testsuite/gas/i386/adx.s b/gas/testsuite/gas/i386/adx.s new file mode 100644 index 0000000..18d107c --- /dev/null +++ b/gas/testsuite/gas/i386/adx.s @@ -0,0 +1,30 @@ +# Check ADX instructions. + .allow_index_reg + .text +_start: + adcx 400(%ecx), %eax + adcx %edx, %ecx + adcx -654321(%esp,%esi,8), %edx + adcx (%eax), %eax + adcxl %edx, %ecx + adcxl (%eax), %eax + + adox 400(%ecx), %eax + adox %edx, %ecx + adox -654321(%esp,%esi,8), %edx + adox (%eax), %eax + adoxl %edx, %ecx + adoxl (%eax), %eax + + .intel_syntax noprefix + + adcx eax, DWORD PTR [edx+399] + adcx edx, ecx + adcx edx, DWORD PTR [esp+esi*8-123456] + adcx eax, DWORD PTR [eax] + + adox eax, DWORD PTR [edx+399] + adox edx, ecx + adox edx, DWORD PTR [esp+esi*8-123456] + adox eax, DWORD PTR [eax] + diff --git a/gas/testsuite/gas/i386/arch-10-1.l b/gas/testsuite/gas/i386/arch-10-1.l index bc66b92..c47d01d 100644 --- a/gas/testsuite/gas/i386/arch-10-1.l +++ b/gas/testsuite/gas/i386/arch-10-1.l @@ -30,7 +30,6 @@ .*:60: Error: .* .*:62: Error: .* .*:64: Error: .* -.*:66: Error: .* GAS LISTING .* @@ -83,24 +82,22 @@ GAS LISTING .* [ ]*46[ ]+invept \(%ecx\),%ebx [ ]*47[ ]+\# RDTSCP [ ]*48[ ]+rdtscp -[ ]*49[ ]+\# 3DNow -[ ]*50[ ]+pmulhrw %mm4,%mm3 -[ ]*51[ ]+\# 3DNow Extensions -[ ]*52[ ]+pswapd %mm4,%mm3 -[ ]*53[ ]+\# SSE4a -[ ]*54[ ]+insertq %xmm2,%xmm1 -[ ]*55[ ]+\# SVME -[ ]*56[ ]+vmload +[ ]*49[ ]+\# 3DNow or PRFCHW +[ ]*50[ ]+prefetchw 0x1000\(,%esi,2\) +[ ]*51[ ]+\# SSE4a +[ ]*52[ ]+insertq %xmm2,%xmm1 +[ ]*53[ ]+\# SVME +[ ]*54[ ]+vmload +[ ]*55[ ]+\# ABM/LZCNT +[ ]*56[ ]+lzcnt %ecx,%ebx GAS LISTING .* -[ ]*57[ ]+\# ABM/LZCNT -[ ]*58[ ]+lzcnt %ecx,%ebx -[ ]*59[ ]+\# PadLock -[ ]*60[ ]+xstorerng -[ ]*61[ ]+\# nop -[ ]*62[ ]+nopl \(%eax\) -[ ]*63[ ]+\# BMI -[ ]*64[ ]+blsr %ecx,%ebx -[ ]*65[ ]+\# TBM -[ ]*66[ ]+blcfill %ecx,%ebx +[ ]*57[ ]+\# PadLock +[ ]*58[ ]+xstorerng +[ ]*59[ ]+\# nop +[ ]*60[ ]+nopl \(%eax\) +[ ]*61[ ]+\# BMI +[ ]*62[ ]+blsr %ecx,%ebx +[ ]*63[ ]+\# TBM +[ ]*64[ ]+blcfill %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10-2.l b/gas/testsuite/gas/i386/arch-10-2.l index a4a51cc..65f09a5 100644 --- a/gas/testsuite/gas/i386/arch-10-2.l +++ b/gas/testsuite/gas/i386/arch-10-2.l @@ -29,7 +29,6 @@ .*:60: Error: .* .*:62: Error: .* .*:64: Error: .* -.*:66: Error: .* GAS LISTING .* @@ -82,24 +81,22 @@ GAS LISTING .* [ ]*46[ ]+invept \(%ecx\),%ebx [ ]*47[ ]+\# RDTSCP [ ]*48[ ]+rdtscp -[ ]*49[ ]+\# 3DNow -[ ]*50[ ]+pmulhrw %mm4,%mm3 -[ ]*51[ ]+\# 3DNow Extensions -[ ]*52[ ]+pswapd %mm4,%mm3 -[ ]*53[ ]+\# SSE4a -[ ]*54[ ]+insertq %xmm2,%xmm1 -[ ]*55[ ]+\# SVME -[ ]*56[ ]+vmload +[ ]*49[ ]+\# 3DNow or PRFCHW +[ ]*50[ ]+prefetchw 0x1000\(,%esi,2\) +[ ]*51[ ]+\# SSE4a +[ ]*52[ ]+insertq %xmm2,%xmm1 +[ ]*53[ ]+\# SVME +[ ]*54[ ]+vmload +[ ]*55[ ]+\# ABM/LZCNT +[ ]*56[ ]+lzcnt %ecx,%ebx GAS LISTING .* -[ ]*57[ ]+\# ABM/LZCNT -[ ]*58[ ]+lzcnt %ecx,%ebx -[ ]*59[ ]+\# PadLock -[ ]*60[ ]+xstorerng -[ ]*61[ ]+\# nop -[ ]*62[ ]+nopl \(%eax\) -[ ]*63[ ]+\# BMI -[ ]*64[ ]+blsr %ecx,%ebx -[ ]*65[ ]+\# TBM -[ ]*66[ ]+blcfill %ecx,%ebx +[ ]*57[ ]+\# PadLock +[ ]*58[ ]+xstorerng +[ ]*59[ ]+\# nop +[ ]*60[ ]+nopl \(%eax\) +[ ]*61[ ]+\# BMI +[ ]*62[ ]+blsr %ecx,%ebx +[ ]*63[ ]+\# TBM +[ ]*64[ ]+blcfill %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10-3.l b/gas/testsuite/gas/i386/arch-10-3.l index 82b2c26..13ff5db 100644 --- a/gas/testsuite/gas/i386/arch-10-3.l +++ b/gas/testsuite/gas/i386/arch-10-3.l @@ -22,7 +22,6 @@ .*:60: Error: .* .*:62: Error: .* .*:64: Error: .* -.*:66: Error: .* GAS LISTING .* @@ -78,24 +77,22 @@ GAS LISTING .* [ ]*46[ ]+invept \(%ecx\),%ebx [ ]*47[ ]+\# RDTSCP [ ]*48[ ]+rdtscp -[ ]*49[ ]+\# 3DNow -[ ]*50[ ]+pmulhrw %mm4,%mm3 -[ ]*51[ ]+\# 3DNow Extensions -[ ]*52[ ]+pswapd %mm4,%mm3 -[ ]*53[ ]+\# SSE4a +[ ]*49[ ]+\# 3DNow or PRFCHW +[ ]*50[ ]+prefetchw 0x1000\(,%esi,2\) +[ ]*51[ ]+\# SSE4a +[ ]*52[ ]+insertq %xmm2,%xmm1 +[ ]*53[ ]+\# SVME GAS LISTING .* -[ ]*54[ ]+insertq %xmm2,%xmm1 -[ ]*55[ ]+\# SVME -[ ]*56[ ]+vmload -[ ]*57[ ]+\# ABM/LZCNT -[ ]*58[ ]+lzcnt %ecx,%ebx -[ ]*59[ ]+\# PadLock -[ ]*60[ ]+xstorerng -[ ]*61[ ]+\# nop -[ ]*62[ ]+nopl \(%eax\) -[ ]*63[ ]+\# BMI -[ ]*64[ ]+blsr %ecx,%ebx -[ ]*65[ ]+\# TBM -[ ]*66[ ]+blcfill %ecx,%ebx +[ ]*54[ ]+vmload +[ ]*55[ ]+\# ABM/LZCNT +[ ]*56[ ]+lzcnt %ecx,%ebx +[ ]*57[ ]+\# PadLock +[ ]*58[ ]+xstorerng +[ ]*59[ ]+\# nop +[ ]*60[ ]+nopl \(%eax\) +[ ]*61[ ]+\# BMI +[ ]*62[ ]+blsr %ecx,%ebx +[ ]*63[ ]+\# TBM +[ ]*64[ ]+blcfill %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10-4.l b/gas/testsuite/gas/i386/arch-10-4.l index af527de..df795ba 100644 --- a/gas/testsuite/gas/i386/arch-10-4.l +++ b/gas/testsuite/gas/i386/arch-10-4.l @@ -20,7 +20,6 @@ .*:60: Error: .* .*:62: Error: .* .*:64: Error: .* -.*:66: Error: .* GAS LISTING .* @@ -76,24 +75,22 @@ GAS LISTING .* [ ]*46[ ]+invept \(%ecx\),%ebx [ ]*47[ ]+\# RDTSCP [ ]*48[ ]+rdtscp -[ ]*49[ ]+\# 3DNow -[ ]*50[ ]+pmulhrw %mm4,%mm3 -[ ]*51[ ]+\# 3DNow Extensions -[ ]*52[ ]+pswapd %mm4,%mm3 -[ ]*53[ ]+\# SSE4a +[ ]*49[ ]+\# 3DNow or PRFCHW +[ ]*50[ ]+prefetchw 0x1000\(,%esi,2\) +[ ]*51[ ]+\# SSE4a +[ ]*52[ ]+insertq %xmm2,%xmm1 +[ ]*53[ ]+\# SVME GAS LISTING .* -[ ]*54[ ]+insertq %xmm2,%xmm1 -[ ]*55[ ]+\# SVME -[ ]*56[ ]+vmload -[ ]*57[ ]+\# ABM/LZCNT -[ ]*58[ ]+lzcnt %ecx,%ebx -[ ]*59[ ]+\# PadLock -[ ]*60[ ]+xstorerng -[ ]*61[ ]+\# nop -[ ]*62[ ]+nopl \(%eax\) -[ ]*63[ ]+\# BMI -[ ]*64[ ]+blsr %ecx,%ebx -[ ]*65[ ]+\# TBM -[ ]*66[ ]+blcfill %ecx,%ebx +[ ]*54[ ]+vmload +[ ]*55[ ]+\# ABM/LZCNT +[ ]*56[ ]+lzcnt %ecx,%ebx +[ ]*57[ ]+\# PadLock +[ ]*58[ ]+xstorerng +[ ]*59[ ]+\# nop +[ ]*60[ ]+nopl \(%eax\) +[ ]*61[ ]+\# BMI +[ ]*62[ ]+blsr %ecx,%ebx +[ ]*63[ ]+\# TBM +[ ]*64[ ]+blcfill %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10-lzcnt.d b/gas/testsuite/gas/i386/arch-10-lzcnt.d index 896a215..a1e040d 100644 --- a/gas/testsuite/gas/i386/arch-10-lzcnt.d +++ b/gas/testsuite/gas/i386/arch-10-lzcnt.d @@ -31,8 +31,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 38 f0 19 movbe \(%ecx\),%ebx [ ]*[a-f0-9]+: 66 0f 38 80 19 invept \(%ecx\),%ebx [ ]*[a-f0-9]+: 0f 01 f9 rdtscp -[ ]*[a-f0-9]+: 0f 0f dc b7 pmulhrw %mm4,%mm3 -[ ]*[a-f0-9]+: 0f 0f dc bb pswapd %mm4,%mm3 +[ ]*[a-f0-9]+: 0f 0d 0c 75 00 10 00 00 prefetchw 0x1000\(,%esi,2\) [ ]*[a-f0-9]+: f2 0f 79 ca insertq %xmm2,%xmm1 [ ]*[a-f0-9]+: 0f 01 da vmload [ ]*[a-f0-9]+: f3 0f bd d9 lzcnt %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10-prefetchw.d b/gas/testsuite/gas/i386/arch-10-prefetchw.d new file mode 100644 index 0000000..1129edf --- /dev/null +++ b/gas/testsuite/gas/i386/arch-10-prefetchw.d @@ -0,0 +1,42 @@ +#source: arch-10.s +#as: -march=i686+nop+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+ept+clflush+syscall+rdtscp+sse4a+svme+lzcnt+padlock+bmi+tbm+prfchw +#objdump: -dw +#name: i386 arch 10 (prefetchw) + +.*: file format .* + +Disassembly of section .text: + +0+ <.text>: +[ ]*[a-f0-9]+: 0f 44 d8 cmove %eax,%ebx +[ ]*[a-f0-9]+: 0f ae 38 clflush \(%eax\) +[ ]*[a-f0-9]+: 0f 05 syscall +[ ]*[a-f0-9]+: 0f fc dc paddb %mm4,%mm3 +[ ]*[a-f0-9]+: f3 0f 58 dc addss %xmm4,%xmm3 +[ ]*[a-f0-9]+: f2 0f 58 dc addsd %xmm4,%xmm3 +[ ]*[a-f0-9]+: 66 0f d0 dc addsubpd %xmm4,%xmm3 +[ ]*[a-f0-9]+: 66 0f 38 01 dc phaddw %xmm4,%xmm3 +[ ]*[a-f0-9]+: 66 0f 38 41 d9 phminposuw %xmm1,%xmm3 +[ ]*[a-f0-9]+: f2 0f 38 f1 d9 crc32l %ecx,%ebx +[ ]*[a-f0-9]+: c5 fc 77 vzeroall +[ ]*[a-f0-9]+: 0f 01 c4 vmxoff +[ ]*[a-f0-9]+: 0f 37 getsec +[ ]*[a-f0-9]+: 0f 01 d0 xgetbv +[ ]*[a-f0-9]+: 0f ae 31 xsaveopt \(%ecx\) +[ ]*[a-f0-9]+: 66 0f 38 dc 01 aesenc \(%ecx\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 3a 44 c1 08 pclmulqdq \$0x8,%xmm1,%xmm0 +[ ]*[a-f0-9]+: c4 e2 79 dc 11 vaesenc \(%ecx\),%xmm0,%xmm2 +[ ]*[a-f0-9]+: c4 e3 49 44 d4 08 vpclmulqdq \$0x8,%xmm4,%xmm6,%xmm2 +[ ]*[a-f0-9]+: c4 e2 c9 98 d4 vfmadd132pd %xmm4,%xmm6,%xmm2 +[ ]*[a-f0-9]+: 0f 38 f0 19 movbe \(%ecx\),%ebx +[ ]*[a-f0-9]+: 66 0f 38 80 19 invept \(%ecx\),%ebx +[ ]*[a-f0-9]+: 0f 01 f9 rdtscp +[ ]*[a-f0-9]+: 0f 0d 0c 75 00 10 00 00 prefetchw 0x1000\(,%esi,2\) +[ ]*[a-f0-9]+: f2 0f 79 ca insertq %xmm2,%xmm1 +[ ]*[a-f0-9]+: 0f 01 da vmload +[ ]*[a-f0-9]+: f3 0f bd d9 lzcnt %ecx,%ebx +[ ]*[a-f0-9]+: 0f a7 c0 xstore-rng +[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) +[ ]*[a-f0-9]+: c4 e2 60 f3 c9 blsr %ecx,%ebx +[ ]*[a-f0-9]+: 8f e9 60 01 c9 blcfill %ecx,%ebx +#pass diff --git a/gas/testsuite/gas/i386/arch-10.d b/gas/testsuite/gas/i386/arch-10.d index 65a58c5..3e2a7f1 100644 --- a/gas/testsuite/gas/i386/arch-10.d +++ b/gas/testsuite/gas/i386/arch-10.d @@ -30,8 +30,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 38 f0 19 movbe \(%ecx\),%ebx [ ]*[a-f0-9]+: 66 0f 38 80 19 invept \(%ecx\),%ebx [ ]*[a-f0-9]+: 0f 01 f9 rdtscp -[ ]*[a-f0-9]+: 0f 0f dc b7 pmulhrw %mm4,%mm3 -[ ]*[a-f0-9]+: 0f 0f dc bb pswapd %mm4,%mm3 +[ ]*[a-f0-9]+: 0f 0d 0c 75 00 10 00 00 prefetchw 0x1000\(,%esi,2\) [ ]*[a-f0-9]+: f2 0f 79 ca insertq %xmm2,%xmm1 [ ]*[a-f0-9]+: 0f 01 da vmload [ ]*[a-f0-9]+: f3 0f bd d9 lzcnt %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10.s b/gas/testsuite/gas/i386/arch-10.s index 76da840..39989d1 100644 --- a/gas/testsuite/gas/i386/arch-10.s +++ b/gas/testsuite/gas/i386/arch-10.s @@ -46,10 +46,8 @@ movbe (%ecx),%ebx invept (%ecx),%ebx # RDTSCP rdtscp -# 3DNow -pmulhrw %mm4,%mm3 -# 3DNow Extensions -pswapd %mm4,%mm3 +# 3DNow or PRFCHW +prefetchw 0x1000(,%esi,2) # SSE4a insertq %xmm2,%xmm1 # SVME diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 89adf69..8ad4ceb 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -126,6 +126,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "arch-9" run_dump_test "arch-10" run_dump_test "arch-10-lzcnt" + run_dump_test "arch-10-prefetchw" run_list_test "arch-10-1" "-march=generic32 -I${srcdir}/$subdir -al" run_list_test "arch-10-2" "-march=i686 -I${srcdir}/$subdir -al" run_list_test "arch-10-3" "-march=i686+sse4.2 -I${srcdir}/$subdir -al" @@ -207,6 +208,10 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "bundle" run_dump_test "bundle-lock" run_dump_test "bundle-bad" + run_dump_test "adx" + run_dump_test "adx-intel" + run_dump_test "rdseed" + run_dump_test "rdseed-intel" # These tests require support for 8 and 16 bit relocs, # so we only run them for ELF and COFF targets. @@ -374,6 +379,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-arch-1" run_dump_test "x86-64-arch-2" run_dump_test "x86-64-arch-2-lzcnt" + run_dump_test "x86-64-arch-2-prefetchw" run_dump_test "x86-64-xsave" run_dump_test "x86-64-xsave-intel" run_dump_test "x86-64-aes" @@ -437,6 +443,10 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-rdrnd" run_dump_test "x86-64-rdrnd-intel" run_dump_test "x86-64-bundle" + run_dump_test "x86-64-adx" + run_dump_test "x86-64-adx-intel" + run_dump_test "x86-64-rdseed" + run_dump_test "x86-64-rdseed-intel" if { ![istarget "*-*-aix*"] && ![istarget "*-*-beos*"] diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-arch-2.d b/gas/testsuite/gas/i386/ilp32/x86-64-arch-2.d index 6b41a2d..e6e55b3 100644 --- a/gas/testsuite/gas/i386/ilp32/x86-64-arch-2.d +++ b/gas/testsuite/gas/i386/ilp32/x86-64-arch-2.d @@ -31,8 +31,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 38 f0 19 movbe \(%rcx\),%ebx [ ]*[a-f0-9]+: 66 0f 38 80 19 invept \(%rcx\),%rbx [ ]*[a-f0-9]+: 0f 01 f9 rdtscp -[ ]*[a-f0-9]+: 0f 0f dc b7 pmulhrw %mm4,%mm3 -[ ]*[a-f0-9]+: 0f 0f dc bb pswapd %mm4,%mm3 +[ ]*[a-f0-9]+: 0f 0d 0c 75 00 10 00 00 prefetchw 0x1000\(,%rsi,2\) [ ]*[a-f0-9]+: f2 0f 79 ca insertq %xmm2,%xmm1 [ ]*[a-f0-9]+: 0f 01 da vmload [ ]*[a-f0-9]+: f3 0f bd d9 lzcnt %ecx,%ebx diff --git a/gas/testsuite/gas/i386/rdseed-intel.d b/gas/testsuite/gas/i386/rdseed-intel.d new file mode 100644 index 0000000..66c55e1 --- /dev/null +++ b/gas/testsuite/gas/i386/rdseed-intel.d @@ -0,0 +1,14 @@ +#objdump: -dwMintel +#name: i386 RdSeed (Intel disassembly) +#source: rdseed.s + +.*: +file format .* + + +Disassembly of section .text: + +0+ <foo>: +[ ]*[a-f0-9]+: 66 0f c7 f8 rdseed ax +[ ]*[a-f0-9]+: 0f c7 f8 rdseed eax +[ ]*[a-f0-9]+: 66 0f c7 fb rdseed bx +[ ]*[a-f0-9]+: 0f c7 fb rdseed ebx diff --git a/gas/testsuite/gas/i386/rdseed.d b/gas/testsuite/gas/i386/rdseed.d new file mode 100644 index 0000000..1a1fb5d --- /dev/null +++ b/gas/testsuite/gas/i386/rdseed.d @@ -0,0 +1,14 @@ +#objdump: -dw +#name: i386 RdSeed + +.*: +file format .* + + +Disassembly of section .text: + +0+ <foo>: +[ ]*[a-f0-9]+: 66 0f c7 f8 rdseed %ax +[ ]*[a-f0-9]+: 0f c7 f8 rdseed %eax +[ ]*[a-f0-9]+: 66 0f c7 fb rdseed %bx +[ ]*[a-f0-9]+: 0f c7 fb rdseed %ebx +#pass diff --git a/gas/testsuite/gas/i386/rdseed.s b/gas/testsuite/gas/i386/rdseed.s new file mode 100644 index 0000000..020057c --- /dev/null +++ b/gas/testsuite/gas/i386/rdseed.s @@ -0,0 +1,10 @@ +# Check RdSeed instruction. + + .text +foo: + rdseed %ax + rdseed %eax + + .intel_syntax noprefix + rdseed bx + rdseed ebx diff --git a/gas/testsuite/gas/i386/x86-64-adx-intel.d b/gas/testsuite/gas/i386/x86-64-adx-intel.d new file mode 100644 index 0000000..8663555 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-adx-intel.d @@ -0,0 +1,51 @@ +#objdump: -drwMintel +#name: x86-64 ADX(Intel mode) +#source: x86-64-adx.s + +.*: +file format .* + + +Disassembly of section .text: + +0+ <_start>: +[ ]*[a-f0-9]+: 67 66 0f 38 f6 81 90 01 00 00 adcx eax,DWORD PTR \[ecx\+0x190\] +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx ecx,edx +[ ]*[a-f0-9]+: 67 66 0f 38 f6 94 f4 0f 04 f6 ff adcx edx,DWORD PTR \[esp\+esi\*8-0x9fbf1\] +[ ]*[a-f0-9]+: 67 66 0f 38 f6 00 adcx eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx ecx,edx +[ ]*[a-f0-9]+: 67 66 0f 38 f6 00 adcx eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 4c 0f 38 f6 99 90 01 00 00 adcx r11,QWORD PTR \[rcx\+0x190\] +[ ]*[a-f0-9]+: 66 4d 0f 38 f6 e6 adcx r12,r14 +[ ]*[a-f0-9]+: 67 66 48 0f 38 f6 94 f4 0f 04 f6 ff adcx rdx,QWORD PTR \[esp\+esi\*8-0x9fbf1\] +[ ]*[a-f0-9]+: 66 49 0f 38 f6 00 adcx rax,QWORD PTR \[r8\] +[ ]*[a-f0-9]+: 66 48 0f 38 f6 ca adcx rcx,rdx +[ ]*[a-f0-9]+: 66 48 0f 38 f6 00 adcx rax,QWORD PTR \[rax\] +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 81 90 01 00 00 adox eax,DWORD PTR \[ecx\+0x190\] +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox ecx,edx +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 94 f4 0f 04 f6 ff adox edx,DWORD PTR \[esp\+esi\*8-0x9fbf1\] +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 00 adox eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox ecx,edx +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 00 adox eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: f3 4c 0f 38 f6 99 90 01 00 00 adox r11,QWORD PTR \[rcx\+0x190\] +[ ]*[a-f0-9]+: f3 4d 0f 38 f6 e6 adox r12,r14 +[ ]*[a-f0-9]+: 67 f3 48 0f 38 f6 94 f4 0f 04 f6 ff adox rdx,QWORD PTR \[esp\+esi\*8-0x9fbf1\] +[ ]*[a-f0-9]+: f3 49 0f 38 f6 00 adox rax,QWORD PTR \[r8\] +[ ]*[a-f0-9]+: f3 48 0f 38 f6 ca adox rcx,rdx +[ ]*[a-f0-9]+: f3 48 0f 38 f6 00 adox rax,QWORD PTR \[rax\] +[ ]*[a-f0-9]+: 67 66 0f 38 f6 82 8f 01 00 00 adcx eax,DWORD PTR \[edx\+0x18f\] +[ ]*[a-f0-9]+: 66 0f 38 f6 d1 adcx edx,ecx +[ ]*[a-f0-9]+: 67 66 0f 38 f6 94 f4 c0 1d fe ff adcx edx,DWORD PTR \[esp\+esi\*8-0x1e240\] +[ ]*[a-f0-9]+: 67 66 0f 38 f6 00 adcx eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 49 0f 38 f6 83 8f 01 00 00 adcx rax,QWORD PTR \[r11\+0x18f\] +[ ]*[a-f0-9]+: 66 49 0f 38 f6 d1 adcx rdx,r9 +[ ]*[a-f0-9]+: 66 48 0f 38 f6 94 f4 c0 1d fe ff adcx rdx,QWORD PTR \[rsp\+rsi\*8-0x1e240\] +[ ]*[a-f0-9]+: 66 48 0f 38 f6 03 adcx rax,QWORD PTR \[rbx\] +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 82 8f 01 00 00 adox eax,DWORD PTR \[edx\+0x18f\] +[ ]*[a-f0-9]+: f3 0f 38 f6 d1 adox edx,ecx +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 94 f4 c0 1d fe ff adox edx,DWORD PTR \[esp\+esi\*8-0x1e240\] +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 00 adox eax,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: f3 49 0f 38 f6 83 8f 01 00 00 adox rax,QWORD PTR \[r11\+0x18f\] +[ ]*[a-f0-9]+: f3 49 0f 38 f6 d1 adox rdx,r9 +[ ]*[a-f0-9]+: f3 48 0f 38 f6 94 f4 c0 1d fe ff adox rdx,QWORD PTR \[rsp\+rsi\*8-0x1e240\] +[ ]*[a-f0-9]+: f3 48 0f 38 f6 03 adox rax,QWORD PTR \[rbx\] +#pass diff --git a/gas/testsuite/gas/i386/x86-64-adx.d b/gas/testsuite/gas/i386/x86-64-adx.d new file mode 100644 index 0000000..4ca5bde --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-adx.d @@ -0,0 +1,50 @@ +#objdump: -dw +#name: x86-64 ADX + +.*: +file format .* + + +Disassembly of section .text: + +0+ <_start>: +[ ]*[a-f0-9]+: 67 66 0f 38 f6 81 90 01 00 00 adcx 0x190\(%ecx\),%eax +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx %edx,%ecx +[ ]*[a-f0-9]+: 67 66 0f 38 f6 94 f4 0f 04 f6 ff adcx -0x9fbf1\(%esp,%esi,8\),%edx +[ ]*[a-f0-9]+: 67 66 0f 38 f6 00 adcx \(%eax\),%eax +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx %edx,%ecx +[ ]*[a-f0-9]+: 67 66 0f 38 f6 00 adcx \(%eax\),%eax +[ ]*[a-f0-9]+: 66 4c 0f 38 f6 99 90 01 00 00 adcx 0x190\(%rcx\),%r11 +[ ]*[a-f0-9]+: 66 4d 0f 38 f6 e6 adcx %r14,%r12 +[ ]*[a-f0-9]+: 67 66 48 0f 38 f6 94 f4 0f 04 f6 ff adcx -0x9fbf1\(%esp,%esi,8\),%rdx +[ ]*[a-f0-9]+: 66 49 0f 38 f6 00 adcx \(%r8\),%rax +[ ]*[a-f0-9]+: 66 48 0f 38 f6 ca adcx %rdx,%rcx +[ ]*[a-f0-9]+: 66 48 0f 38 f6 00 adcx \(%rax\),%rax +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 81 90 01 00 00 adox 0x190\(%ecx\),%eax +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox %edx,%ecx +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 94 f4 0f 04 f6 ff adox -0x9fbf1\(%esp,%esi,8\),%edx +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 00 adox \(%eax\),%eax +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox %edx,%ecx +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 00 adox \(%eax\),%eax +[ ]*[a-f0-9]+: f3 4c 0f 38 f6 99 90 01 00 00 adox 0x190\(%rcx\),%r11 +[ ]*[a-f0-9]+: f3 4d 0f 38 f6 e6 adox %r14,%r12 +[ ]*[a-f0-9]+: 67 f3 48 0f 38 f6 94 f4 0f 04 f6 ff adox -0x9fbf1\(%esp,%esi,8\),%rdx +[ ]*[a-f0-9]+: f3 49 0f 38 f6 00 adox \(%r8\),%rax +[ ]*[a-f0-9]+: f3 48 0f 38 f6 ca adox %rdx,%rcx +[ ]*[a-f0-9]+: f3 48 0f 38 f6 00 adox \(%rax\),%rax +[ ]*[a-f0-9]+: 67 66 0f 38 f6 82 8f 01 00 00 adcx 0x18f\(%edx\),%eax +[ ]*[a-f0-9]+: 66 0f 38 f6 d1 adcx %ecx,%edx +[ ]*[a-f0-9]+: 67 66 0f 38 f6 94 f4 c0 1d fe ff adcx -0x1e240\(%esp,%esi,8\),%edx +[ ]*[a-f0-9]+: 67 66 0f 38 f6 00 adcx \(%eax\),%eax +[ ]*[a-f0-9]+: 66 49 0f 38 f6 83 8f 01 00 00 adcx 0x18f\(%r11\),%rax +[ ]*[a-f0-9]+: 66 49 0f 38 f6 d1 adcx %r9,%rdx +[ ]*[a-f0-9]+: 66 48 0f 38 f6 94 f4 c0 1d fe ff adcx -0x1e240\(%rsp,%rsi,8\),%rdx +[ ]*[a-f0-9]+: 66 48 0f 38 f6 03 adcx \(%rbx\),%rax +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 82 8f 01 00 00 adox 0x18f\(%edx\),%eax +[ ]*[a-f0-9]+: f3 0f 38 f6 d1 adox %ecx,%edx +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 94 f4 c0 1d fe ff adox -0x1e240\(%esp,%esi,8\),%edx +[ ]*[a-f0-9]+: 67 f3 0f 38 f6 00 adox \(%eax\),%eax +[ ]*[a-f0-9]+: f3 49 0f 38 f6 83 8f 01 00 00 adox 0x18f\(%r11\),%rax +[ ]*[a-f0-9]+: f3 49 0f 38 f6 d1 adox %r9,%rdx +[ ]*[a-f0-9]+: f3 48 0f 38 f6 94 f4 c0 1d fe ff adox -0x1e240\(%rsp,%rsi,8\),%rdx +[ ]*[a-f0-9]+: f3 48 0f 38 f6 03 adox \(%rbx\),%rax +#pass diff --git a/gas/testsuite/gas/i386/x86-64-adx.s b/gas/testsuite/gas/i386/x86-64-adx.s new file mode 100644 index 0000000..ff32b40 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-adx.s @@ -0,0 +1,53 @@ +# Check 64 bit ADX instructions. + .allow_index_reg + .text +_start: + adcx 400(%ecx), %eax + adcx %edx, %ecx + adcx -654321(%esp,%esi,8), %edx + adcx (%eax), %eax + adcxl %edx, %ecx + adcxl (%eax), %eax + + adcx 400(%rcx), %r11 + adcx %r14, %r12 + adcx -654321(%esp,%esi,8), %rdx + adcx (%r8), %rax + adcxq %rdx, %rcx + adcxq (%rax), %rax + + adox 400(%ecx), %eax + adox %edx, %ecx + adox -654321(%esp,%esi,8), %edx + adox (%eax), %eax + adoxl %edx, %ecx + adoxl (%eax), %eax + + adox 400(%rcx), %r11 + adox %r14, %r12 + adox -654321(%esp,%esi,8), %rdx + adox (%r8), %rax + adoxq %rdx, %rcx + adoxq (%rax), %rax + + .intel_syntax noprefix + + adcx eax, DWORD PTR [edx+399] + adcx edx, ecx + adcx edx, DWORD PTR [esp+esi*8-123456] + adcx eax, DWORD PTR [eax] + + adcx rax, QWORD PTR [r11+399] + adcx rdx, r9 + adcx rdx, QWORD PTR [rsp+rsi*8-123456] + adcx rax, [rbx] + + adox eax, DWORD PTR [edx+399] + adox edx, ecx + adox edx, DWORD PTR [esp+esi*8-123456] + adox eax, DWORD PTR [eax] + + adox rax, QWORD PTR [r11+399] + adox rdx, r9 + adox rdx, QWORD PTR [rsp+rsi*8-123456] + adox rax, QWORD PTR [rbx] diff --git a/gas/testsuite/gas/i386/x86-64-arch-2-lzcnt.d b/gas/testsuite/gas/i386/x86-64-arch-2-lzcnt.d index 34fd645..02cfc47 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2-lzcnt.d +++ b/gas/testsuite/gas/i386/x86-64-arch-2-lzcnt.d @@ -31,8 +31,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 38 f0 19 movbe \(%rcx\),%ebx [ ]*[a-f0-9]+: 66 0f 38 80 19 invept \(%rcx\),%rbx [ ]*[a-f0-9]+: 0f 01 f9 rdtscp -[ ]*[a-f0-9]+: 0f 0f dc b7 pmulhrw %mm4,%mm3 -[ ]*[a-f0-9]+: 0f 0f dc bb pswapd %mm4,%mm3 +[ ]*[a-f0-9]+: 0f 0d 0c 75 00 10 00 00 prefetchw 0x1000\(,%rsi,2\) [ ]*[a-f0-9]+: f2 0f 79 ca insertq %xmm2,%xmm1 [ ]*[a-f0-9]+: 0f 01 da vmload [ ]*[a-f0-9]+: f3 0f bd d9 lzcnt %ecx,%ebx diff --git a/gas/testsuite/gas/i386/x86-64-arch-2-prefetchw.d b/gas/testsuite/gas/i386/x86-64-arch-2-prefetchw.d new file mode 100644 index 0000000..c7ea055 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-arch-2-prefetchw.d @@ -0,0 +1,41 @@ +#source: x86-64-arch-2.s +#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+ept+clflush+syscall+rdtscp+sse4a+svme+lzcnt+padlock+bmi+tbm+prfchw +#objdump: -dw +#name: x86-64 arch 2 (prefetchw) + +.*: file format .* + +Disassembly of section .text: + +0+ <.text>: +[ ]*[a-f0-9]+: 0f 44 d8 cmove %eax,%ebx +[ ]*[a-f0-9]+: 0f ae 38 clflush \(%rax\) +[ ]*[a-f0-9]+: 0f 05 syscall +[ ]*[a-f0-9]+: 0f fc dc paddb %mm4,%mm3 +[ ]*[a-f0-9]+: f3 0f 58 dc addss %xmm4,%xmm3 +[ ]*[a-f0-9]+: f2 0f 58 dc addsd %xmm4,%xmm3 +[ ]*[a-f0-9]+: 66 0f d0 dc addsubpd %xmm4,%xmm3 +[ ]*[a-f0-9]+: 66 0f 38 01 dc phaddw %xmm4,%xmm3 +[ ]*[a-f0-9]+: 66 0f 38 41 d9 phminposuw %xmm1,%xmm3 +[ ]*[a-f0-9]+: f2 0f 38 f1 d9 crc32l %ecx,%ebx +[ ]*[a-f0-9]+: c5 fc 77 vzeroall +[ ]*[a-f0-9]+: 0f 01 c4 vmxoff +[ ]*[a-f0-9]+: 0f 37 getsec +[ ]*[a-f0-9]+: 0f 01 d0 xgetbv +[ ]*[a-f0-9]+: 0f ae 31 xsaveopt \(%rcx\) +[ ]*[a-f0-9]+: 66 0f 38 dc 01 aesenc \(%rcx\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 3a 44 c1 08 pclmulqdq \$0x8,%xmm1,%xmm0 +[ ]*[a-f0-9]+: c4 e2 79 dc 11 vaesenc \(%rcx\),%xmm0,%xmm2 +[ ]*[a-f0-9]+: c4 e3 49 44 d4 08 vpclmulqdq \$0x8,%xmm4,%xmm6,%xmm2 +[ ]*[a-f0-9]+: c4 e2 c9 98 d4 vfmadd132pd %xmm4,%xmm6,%xmm2 +[ ]*[a-f0-9]+: 0f 38 f0 19 movbe \(%rcx\),%ebx +[ ]*[a-f0-9]+: 66 0f 38 80 19 invept \(%rcx\),%rbx +[ ]*[a-f0-9]+: 0f 01 f9 rdtscp +[ ]*[a-f0-9]+: 0f 0d 0c 75 00 10 00 00 prefetchw 0x1000\(,%rsi,2\) +[ ]*[a-f0-9]+: f2 0f 79 ca insertq %xmm2,%xmm1 +[ ]*[a-f0-9]+: 0f 01 da vmload +[ ]*[a-f0-9]+: f3 0f bd d9 lzcnt %ecx,%ebx +[ ]*[a-f0-9]+: 0f a7 c0 xstore-rng +[ ]*[a-f0-9]+: c4 e2 60 f3 c9 blsr %ecx,%ebx +[ ]*[a-f0-9]+: 8f e9 60 01 c9 blcfill %ecx,%ebx +#pass diff --git a/gas/testsuite/gas/i386/x86-64-arch-2.d b/gas/testsuite/gas/i386/x86-64-arch-2.d index 824badd..0081687 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2.d +++ b/gas/testsuite/gas/i386/x86-64-arch-2.d @@ -30,8 +30,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 38 f0 19 movbe \(%rcx\),%ebx [ ]*[a-f0-9]+: 66 0f 38 80 19 invept \(%rcx\),%rbx [ ]*[a-f0-9]+: 0f 01 f9 rdtscp -[ ]*[a-f0-9]+: 0f 0f dc b7 pmulhrw %mm4,%mm3 -[ ]*[a-f0-9]+: 0f 0f dc bb pswapd %mm4,%mm3 +[ ]*[a-f0-9]+: 0f 0d 0c 75 00 10 00 00 prefetchw 0x1000\(,%rsi,2\) [ ]*[a-f0-9]+: f2 0f 79 ca insertq %xmm2,%xmm1 [ ]*[a-f0-9]+: 0f 01 da vmload [ ]*[a-f0-9]+: f3 0f bd d9 lzcnt %ecx,%ebx diff --git a/gas/testsuite/gas/i386/x86-64-arch-2.s b/gas/testsuite/gas/i386/x86-64-arch-2.s index 8da9b0b..7292e0a 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2.s +++ b/gas/testsuite/gas/i386/x86-64-arch-2.s @@ -46,10 +46,8 @@ movbe (%rcx),%ebx invept (%rcx),%rbx # RDTSCP rdtscp -# 3DNow -pmulhrw %mm4,%mm3 -# 3DNow Extensions -pswapd %mm4,%mm3 +# 3DNow or PRFCHW +prefetchw 0x1000(,%rsi,2) # SSE4a insertq %xmm2,%xmm1 # SVME diff --git a/gas/testsuite/gas/i386/x86-64-rdseed-intel.d b/gas/testsuite/gas/i386/x86-64-rdseed-intel.d new file mode 100644 index 0000000..a16d102 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-rdseed-intel.d @@ -0,0 +1,23 @@ +#objdump: -drwMintel +#name: x86-64 RdSeed(Intel mode) +#source: x86-64-rdseed.s + +.*: +file format .* + + +Disassembly of section .text: + +0+ <foo>: +[ ]*[a-f0-9]+: 66 0f c7 f8 rdseed ax +[ ]*[a-f0-9]+: 0f c7 f8 rdseed eax +[ ]*[a-f0-9]+: 48 0f c7 f8 rdseed rax +[ ]*[a-f0-9]+: 66 41 0f c7 fb rdseed r11w +[ ]*[a-f0-9]+: 41 0f c7 fb rdseed r11d +[ ]*[a-f0-9]+: 49 0f c7 fb rdseed r11 +[ ]*[a-f0-9]+: 66 0f c7 fb rdseed bx +[ ]*[a-f0-9]+: 0f c7 fb rdseed ebx +[ ]*[a-f0-9]+: 48 0f c7 fb rdseed rbx +[ ]*[a-f0-9]+: 66 41 0f c7 fb rdseed r11w +[ ]*[a-f0-9]+: 41 0f c7 fb rdseed r11d +[ ]*[a-f0-9]+: 49 0f c7 fb rdseed r11 +#pass diff --git a/gas/testsuite/gas/i386/x86-64-rdseed.d b/gas/testsuite/gas/i386/x86-64-rdseed.d new file mode 100644 index 0000000..6fa3b27 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-rdseed.d @@ -0,0 +1,22 @@ +#objdump: -dw +#name: x86-64 RdSeed + +.*: +file format .* + + +Disassembly of section .text: + +0+ <foo>: +[ ]*[a-f0-9]+: 66 0f c7 f8 rdseed %ax +[ ]*[a-f0-9]+: 0f c7 f8 rdseed %eax +[ ]*[a-f0-9]+: 48 0f c7 f8 rdseed %rax +[ ]*[a-f0-9]+: 66 41 0f c7 fb rdseed %r11w +[ ]*[a-f0-9]+: 41 0f c7 fb rdseed %r11d +[ ]*[a-f0-9]+: 49 0f c7 fb rdseed %r11 +[ ]*[a-f0-9]+: 66 0f c7 fb rdseed %bx +[ ]*[a-f0-9]+: 0f c7 fb rdseed %ebx +[ ]*[a-f0-9]+: 48 0f c7 fb rdseed %rbx +[ ]*[a-f0-9]+: 66 41 0f c7 fb rdseed %r11w +[ ]*[a-f0-9]+: 41 0f c7 fb rdseed %r11d +[ ]*[a-f0-9]+: 49 0f c7 fb rdseed %r11 +#pass diff --git a/gas/testsuite/gas/i386/x86-64-rdseed.s b/gas/testsuite/gas/i386/x86-64-rdseed.s new file mode 100644 index 0000000..1b3b7b6 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-rdseed.s @@ -0,0 +1,18 @@ +# Check 64-bit new RdSeed instruction. + + .text +foo: + rdseed %ax + rdseed %eax + rdseed %rax + rdseed %r11w + rdseed %r11d + rdseed %r11 + + .intel_syntax noprefix + rdseed bx + rdseed ebx + rdseed rbx + rdseed r11w + rdseed r11d + rdseed r11 |