x86: Add assembler -mx86-used-note=yes test

Check assembler -mx86-used-note=yes option and readelf -n output.

	* testsuite/gas/i386/i386.exp: Run -mx86-used-note=yes tests.
	* testsuite/gas/i386/property-2.d: New file.
	* testsuite/gas/i386/property-2.s: Likewise.
	* testsuite/gas/i386/x86-64-property-2.d: Likewise.
This commit is contained in:
H.J. Lu 2019-04-05 12:41:58 -07:00
parent d6aab7a11b
commit 4ef40579f9
5 changed files with 59 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2019-04-05 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/gas/i386/i386.exp: Run -mx86-used-note=yes tests.
* testsuite/gas/i386/property-2.d: New file.
* testsuite/gas/i386/property-2.s: Likewise.
* testsuite/gas/i386/x86-64-property-2.d: Likewise.
2019-04-05 Xuepeng Guo <xuepeng.guo@intel.com>
* config/tc-i386.c (cpu_arch): Add .avx512_bf16.

View File

@ -549,6 +549,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "evex-no-scale-32"
run_dump_test "property-1"
run_dump_test "property-2"
if { [gas_64_check] } then {
run_dump_test "att-regs"
@ -1062,6 +1063,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "evex-no-scale-64"
run_dump_test "x86-64-property-1"
run_dump_test "x86-64-property-2"
}
set ASFLAGS "$old_ASFLAGS"

View File

@ -0,0 +1,9 @@
#name: i386 property 2
#as: -mx86-used-note=yes
#readelf: -n
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
Properties: x86 ISA used: CMOV, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, FMA, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, AVX512_4FMAPS, AVX512_4VNNIW, AVX512_BITALG, AVX512_IFMA, AVX512_VBMI, AVX512_VBMI2, AVX512_VNNI
x86 feature used: x86, x87, MMX, XMM, YMM, ZMM, FXSR, XSAVE, XSAVEOPT, XSAVEC

View File

@ -0,0 +1,31 @@
.text
fsin
movq %mm0, %mm1
fxsave (%eax)
xsave (%eax)
xsaveopt (%eax)
xsavec (%eax)
cmove %eax,%ebx
movaps %xmm0, %xmm1
movapd %xmm0, %xmm1
mwait
psignb %xmm0, %xmm1
blendvpd %xmm0, %xmm1
pcmpgtq %xmm0, %xmm1
vmovaps %xmm0, %xmm1
vpabsb %ymm0, %ymm1
vfmadd231ps %ymm0, %ymm1, %ymm1
vmovaps %zmm0, %zmm1
vplzcntd %zmm0, %zmm1
vrsqrt28pd %zmm0, %zmm1
vscatterpf0dpd (%eax,%ymm1){%k1}
{evex} vpmovzxdq %xmm0, %xmm1
vandnpd %zmm0, %zmm0, %zmm1
vpmaxuw %zmm0, %zmm0, %zmm1
v4fnmaddss (%ecx), %xmm4, %xmm1
vpopcntb %zmm0, %zmm1
vp4dpwssd (%ecx), %zmm0, %zmm1
vpmadd52luq (%ecx), %zmm0, %zmm1
vpermt2b (%ecx), %zmm0, %zmm1
vpcompressb %zmm0, %zmm1
vpdpwssds (%ecx), %zmm0, %zmm1

View File

@ -0,0 +1,10 @@
#name: x86-64 property 2
#source: property-2.s
#as: -mx86-used-note=yes
#readelf: -n
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
Properties: x86 ISA used: CMOV, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, FMA, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, AVX512_4FMAPS, AVX512_4VNNIW, AVX512_BITALG, AVX512_IFMA, AVX512_VBMI, AVX512_VBMI2, AVX512_VNNI
x86 feature used: x86, x87, MMX, XMM, YMM, ZMM, FXSR, XSAVE, XSAVEOPT, XSAVEC