From 60aa667ec4711b34cd0c34908198bde2ea510849 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 20 Sep 2012 11:53:33 +0000 Subject: Replace CpuSSE3 with CpuCX16 for cmpxchg16b gas/ * config/tc-i386.c (cpu_arch): Add .cx16. * doc/c-i386.texi: Document .cx16. gas/testsuite/ * gas/i386/x86-64-arch-2.s: Add test for cmpxchg16b. * gas/i386/x86-64-arch-2.d: Update correspondingly. * gas/i386/x86-64-arch-2-bdver2.d: Likewise. * gas/i386/x86-64-arch-2-btver1.d: Likewise. * gas/i386/x86-64-arch-2-btver2.d: Likewise. * gas/i386/x86-64-arch-2-lzcnt.d: Likewise. * gas/i386/x86-64-arch-2-prefetchw.d: Likewise. * gas/i386/ilp32/x86-64-arch-2.d: Likewise. opcodes/ * i386-gen.c (cpu_flag_init): Add CpuCX16 to CPU_NOCONA_FLAGS, CPU_CORE_FLAGS, CPU_CORE2_FLAGS, CPU_COREI7_FLAGS, CPU_BDVER1_FLAGS, CPU_BDVER2_FLAGS, CPU_BTVER1_FLAGS, CPU_BTVER2_FLAGS. Add CPU_CX16_FLAGS. (cpu_flags): Add CpuCX16. * i386-opc.h (CpuCX16): New. (i386_cpu_flags): Add cpucx16. * i386-opc.tbl: Replace CpuSSE3 with CpuCX16 for cmpxchg16b. * i386-tbl.h: Regenerate. * i386-init.h: Likewise. --- gas/ChangeLog | 5 +++++ gas/config/tc-i386.c | 2 ++ gas/doc/c-i386.texi | 3 ++- gas/testsuite/ChangeLog | 11 +++++++++++ gas/testsuite/gas/i386/ilp32/x86-64-arch-2.d | 3 ++- gas/testsuite/gas/i386/x86-64-arch-2-bdver2.d | 3 ++- gas/testsuite/gas/i386/x86-64-arch-2-btver1.d | 3 ++- gas/testsuite/gas/i386/x86-64-arch-2-btver2.d | 1 + gas/testsuite/gas/i386/x86-64-arch-2-lzcnt.d | 3 ++- gas/testsuite/gas/i386/x86-64-arch-2-prefetchw.d | 3 ++- gas/testsuite/gas/i386/x86-64-arch-2.d | 3 ++- gas/testsuite/gas/i386/x86-64-arch-2.s | 2 ++ 12 files changed, 35 insertions(+), 7 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 2963203..ed231a6 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2012-09-20 Michael Zolotukhin + + * config/tc-i386.c (cpu_arch): Add .cx16. + * doc/c-i386.texi: Document .cx16. + 2012-09-19 Steve Ellcey * configure.tgt: Add mips*-mti-elf* target. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 61ca44a..03a335f 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -736,6 +736,8 @@ static const arch_entry cpu_arch[] = CPU_LWP_FLAGS, 0, 0 }, { STRING_COMMA_LEN (".movbe"), PROCESSOR_UNKNOWN, CPU_MOVBE_FLAGS, 0, 0 }, + { STRING_COMMA_LEN (".cx16"), PROCESSOR_UNKNOWN, + CPU_CX16_FLAGS, 0, 0 }, { STRING_COMMA_LEN (".ept"), PROCESSOR_UNKNOWN, CPU_EPT_FLAGS, 0, 0 }, { STRING_COMMA_LEN (".lzcnt"), PROCESSOR_UNKNOWN, diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi index 5b7b007..dde545b 100644 --- a/gas/doc/c-i386.texi +++ b/gas/doc/c-i386.texi @@ -171,6 +171,7 @@ accept various extension mnemonics. For example, @code{lwp}, @code{fma4}, @code{xop}, +@code{cx16}, @code{syscall}, @code{rdtscp}, @code{3dnow}, @@ -1027,7 +1028,7 @@ supported on the CPU specified. The choices for @var{cpu_type} are: @item @samp{.rtm} @tab @samp{.adx} @tab @samp{.rdseed} @tab @samp{.prfchw} @item @samp{.3dnow} @tab @samp{.3dnowa} @tab @samp{.sse4a} @tab @samp{.sse5} @item @samp{.syscall} @tab @samp{.rdtscp} @tab @samp{.svme} @tab @samp{.abm} -@item @samp{.lwp} @tab @samp{.fma4} @tab @samp{.xop} +@item @samp{.lwp} @tab @samp{.fma4} @tab @samp{.xop} @tab @samp{.cx16} @item @samp{.padlock} @end multitable diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 3aa7256..07c73e0 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2012-09-20 Michael Zolotukhin + + * gas/i386/x86-64-arch-2.s: Add test for cmpxchg16b. + * gas/i386/x86-64-arch-2.d: Update correspondingly. + * gas/i386/x86-64-arch-2-bdver2.d: Likewise. + * gas/i386/x86-64-arch-2-btver1.d: Likewise. + * gas/i386/x86-64-arch-2-btver2.d: Likewise. + * gas/i386/x86-64-arch-2-lzcnt.d: Likewise. + * gas/i386/x86-64-arch-2-prefetchw.d: Likewise. + * gas/i386/ilp32/x86-64-arch-2.d: Likewise. + 2012-09-18 Kyrylo Tkachov * gas/arm/armv8-a-bad.l: Updated for changed mnemonics. 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 e6e55b3..2e92977 100644 --- a/gas/testsuite/gas/i386/ilp32/x86-64-arch-2.d +++ b/gas/testsuite/gas/i386/ilp32/x86-64-arch-2.d @@ -1,5 +1,5 @@ #source: ../x86-64-arch-2.s -#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+ept+clflush+syscall+rdtscp+3dnowa+sse4a+svme+abm+padlock+bmi+tbm +#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+cx16+ept+clflush+syscall+rdtscp+3dnowa+sse4a+svme+abm+padlock+bmi+tbm #objdump: -dw #name: x86-64 (ILP32) arch 2 @@ -29,6 +29,7 @@ Disassembly of section .text: [ ]*[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]+: 48 0f c7 0e cmpxchg16b \(%rsi\) [ ]*[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\) diff --git a/gas/testsuite/gas/i386/x86-64-arch-2-bdver2.d b/gas/testsuite/gas/i386/x86-64-arch-2-bdver2.d index eadcad2..e815572 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2-bdver2.d +++ b/gas/testsuite/gas/i386/x86-64-arch-2-bdver2.d @@ -1,5 +1,5 @@ #source: x86-64-arch-2.s -#as: -march=bdver2+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+movbe+ept+clflush+svme+padlock+prfchw +#as: -march=bdver2+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+movbe+cx16+ept+clflush+svme+padlock+prfchw #objdump: -dw #name: x86-64 arch 2 (bdver2) @@ -29,6 +29,7 @@ Disassembly of section .text: [ ]*[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]+: 48 0f c7 0e cmpxchg16b \(%rsi\) [ ]*[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\) diff --git a/gas/testsuite/gas/i386/x86-64-arch-2-btver1.d b/gas/testsuite/gas/i386/x86-64-arch-2-btver1.d index 8cfa780..9d091c7 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2-btver1.d +++ b/gas/testsuite/gas/i386/x86-64-arch-2-btver1.d @@ -1,5 +1,5 @@ #source: x86-64-arch-2.s -#as: -march=btver1+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+movbe+ept+clflush+svme+padlock+fma+bmi+tbm +#as: -march=btver1+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+movbe+cx16+ept+clflush+svme+padlock+fma+bmi+tbm #objdump: -dw #name: x86-64 arch 2 (btver1) @@ -29,6 +29,7 @@ Disassembly of section .text: [ ]*[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]+: 48 0f c7 0e cmpxchg16b \(%rsi\) [ ]*[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\) diff --git a/gas/testsuite/gas/i386/x86-64-arch-2-btver2.d b/gas/testsuite/gas/i386/x86-64-arch-2-btver2.d index 61e8fae..ccc4406 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2-btver2.d +++ b/gas/testsuite/gas/i386/x86-64-arch-2-btver2.d @@ -29,6 +29,7 @@ Disassembly of section .text: [ ]*[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]+: 48 0f c7 0e cmpxchg16b \(%rsi\) [ ]*[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\) 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 02cfc47..81c9dea 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2-lzcnt.d +++ b/gas/testsuite/gas/i386/x86-64-arch-2-lzcnt.d @@ -1,5 +1,5 @@ #source: x86-64-arch-2.s -#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+ept+clflush+syscall+rdtscp+3dnowa+sse4a+svme+lzcnt+padlock+bmi+tbm +#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+cx16+ept+clflush+syscall+rdtscp+3dnowa+sse4a+svme+lzcnt+padlock+bmi+tbm #objdump: -dw #name: x86-64 arch 2 (lzcnt) @@ -29,6 +29,7 @@ Disassembly of section .text: [ ]*[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]+: 48 0f c7 0e cmpxchg16b \(%rsi\) [ ]*[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\) diff --git a/gas/testsuite/gas/i386/x86-64-arch-2-prefetchw.d b/gas/testsuite/gas/i386/x86-64-arch-2-prefetchw.d index c7ea055..35c1c96 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2-prefetchw.d +++ b/gas/testsuite/gas/i386/x86-64-arch-2-prefetchw.d @@ -1,5 +1,5 @@ #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 +#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+cx16+ept+clflush+syscall+rdtscp+sse4a+svme+lzcnt+padlock+bmi+tbm+prfchw #objdump: -dw #name: x86-64 arch 2 (prefetchw) @@ -29,6 +29,7 @@ Disassembly of section .text: [ ]*[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]+: 48 0f c7 0e cmpxchg16b \(%rsi\) [ ]*[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\) diff --git a/gas/testsuite/gas/i386/x86-64-arch-2.d b/gas/testsuite/gas/i386/x86-64-arch-2.d index 0081687..be30aa7 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2.d +++ b/gas/testsuite/gas/i386/x86-64-arch-2.d @@ -1,4 +1,4 @@ -#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+ept+clflush+syscall+rdtscp+3dnowa+sse4a+svme+abm+padlock+bmi+tbm +#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+cx16+ept+clflush+syscall+rdtscp+3dnowa+sse4a+svme+abm+padlock+bmi+tbm #objdump: -dw #name: x86-64 arch 2 @@ -28,6 +28,7 @@ Disassembly of section .text: [ ]*[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]+: 48 0f c7 0e cmpxchg16b \(%rsi\) [ ]*[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\) diff --git a/gas/testsuite/gas/i386/x86-64-arch-2.s b/gas/testsuite/gas/i386/x86-64-arch-2.s index 7292e0a..fb98771 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2.s +++ b/gas/testsuite/gas/i386/x86-64-arch-2.s @@ -42,6 +42,8 @@ vpclmulqdq $8,%xmm4,%xmm6,%xmm2 vfmadd132pd %xmm4,%xmm6,%xmm2 # MOVBE movbe (%rcx),%ebx +# CX16 +cmpxchg16b (%rsi) # EPT invept (%rcx),%rbx # RDTSCP -- cgit v1.1