mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
x86: record register use for SIMD insns without respective explicit operands
VZERO{ALL,UPPER} modify YMM registers despite having no operands. While {,V}{LD,ST}MXCSR don't modify XMM registers, MXCSR and XMMn collectively form underlying machine state.
This commit is contained in:
@ -1,3 +1,15 @@
|
|||||||
|
2021-02-16 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
|
* config/tc-i386.c (output_insn): Handle ldmxcsr, stmxcsr,
|
||||||
|
vldmxcsr, vstmxcsr, vzeroall, and vzeroupper.
|
||||||
|
* testsuite/gas/i386/property-ldmxcsr.s,
|
||||||
|
testsuite/gas/i386/property-ldmxcsr.d,
|
||||||
|
testsuite/gas/i386/property-vldmxcsr.s,
|
||||||
|
testsuite/gas/i386/property-vldmxcsr.d,
|
||||||
|
testsuite/gas/i386/property-vzeroall.s,
|
||||||
|
testsuite/gas/i386/property-vzeroall.d: New.
|
||||||
|
* testsuite/gas/i386/i386.exp: Run new tests.
|
||||||
|
|
||||||
2021-02-16 Jan Beulich <jbeulich@suse.com>
|
2021-02-16 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
* testsuite/gas/i386/i386.exp: Move bitness-independent property
|
* testsuite/gas/i386/i386.exp: Move bitness-independent property
|
||||||
|
@ -9208,10 +9208,12 @@ output_insn (void)
|
|||||||
|| i.tm.cpu_flags.bitfield.cpu687
|
|| i.tm.cpu_flags.bitfield.cpu687
|
||||||
|| i.tm.cpu_flags.bitfield.cpufisttp)
|
|| i.tm.cpu_flags.bitfield.cpufisttp)
|
||||||
x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_X87;
|
x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_X87;
|
||||||
|
|
||||||
if ((i.xstate & xstate_mmx)
|
if ((i.xstate & xstate_mmx)
|
||||||
|| i.tm.base_opcode == 0xf77 /* emms */
|
|| i.tm.base_opcode == 0xf77 /* emms */
|
||||||
|| i.tm.base_opcode == 0xf0e /* femms */)
|
|| i.tm.base_opcode == 0xf0e /* femms */)
|
||||||
x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_MMX;
|
x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_MMX;
|
||||||
|
|
||||||
if (i.index_reg)
|
if (i.index_reg)
|
||||||
{
|
{
|
||||||
if (i.index_reg->reg_type.bitfield.zmmword)
|
if (i.index_reg->reg_type.bitfield.zmmword)
|
||||||
@ -9221,10 +9223,20 @@ output_insn (void)
|
|||||||
else if (i.index_reg->reg_type.bitfield.xmmword)
|
else if (i.index_reg->reg_type.bitfield.xmmword)
|
||||||
i.xstate |= xstate_xmm;
|
i.xstate |= xstate_xmm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* vzeroall / vzeroupper */
|
||||||
|
if (i.tm.base_opcode == 0x77 && i.tm.cpu_flags.bitfield.cpuavx)
|
||||||
|
i.xstate |= xstate_ymm;
|
||||||
|
|
||||||
if ((i.xstate & xstate_xmm)
|
if ((i.xstate & xstate_xmm)
|
||||||
|
/* ldmxcsr / stmxcsr */
|
||||||
|
|| (i.tm.base_opcode == 0xfae && i.tm.cpu_flags.bitfield.cpusse)
|
||||||
|
/* vldmxcsr / vstmxcsr */
|
||||||
|
|| (i.tm.base_opcode == 0xae && i.tm.cpu_flags.bitfield.cpuavx)
|
||||||
|| i.tm.cpu_flags.bitfield.cpuwidekl
|
|| i.tm.cpu_flags.bitfield.cpuwidekl
|
||||||
|| i.tm.cpu_flags.bitfield.cpukl)
|
|| i.tm.cpu_flags.bitfield.cpukl)
|
||||||
x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_XMM;
|
x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_XMM;
|
||||||
|
|
||||||
if ((i.xstate & xstate_ymm) == xstate_ymm)
|
if ((i.xstate & xstate_ymm) == xstate_ymm)
|
||||||
x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_YMM;
|
x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_YMM;
|
||||||
if ((i.xstate & xstate_zmm) == xstate_zmm)
|
if ((i.xstate & xstate_zmm) == xstate_zmm)
|
||||||
|
@ -725,6 +725,9 @@ if {[is_elf_format] || [istarget "*-*-vxworks*"]} then {
|
|||||||
run_dump_test "property-11"
|
run_dump_test "property-11"
|
||||||
run_dump_test "property-12"
|
run_dump_test "property-12"
|
||||||
run_dump_test "property-13"
|
run_dump_test "property-13"
|
||||||
|
run_dump_test "property-ldmxcsr"
|
||||||
|
run_dump_test "property-vldmxcsr"
|
||||||
|
run_dump_test "property-vzeroall"
|
||||||
|
|
||||||
if {![istarget "*-*-dragonfly*"]
|
if {![istarget "*-*-dragonfly*"]
|
||||||
&& ![istarget "*-*-gnu*"]
|
&& ![istarget "*-*-gnu*"]
|
||||||
|
9
gas/testsuite/gas/i386/property-ldmxcsr.d
Normal file
9
gas/testsuite/gas/i386/property-ldmxcsr.d
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#name: i386 property ldmxcsr
|
||||||
|
#as: -mx86-used-note=yes --generate-missing-build-notes=no
|
||||||
|
#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: x86-64-baseline
|
||||||
|
x86 feature used: x86, XMM
|
2
gas/testsuite/gas/i386/property-ldmxcsr.s
Normal file
2
gas/testsuite/gas/i386/property-ldmxcsr.s
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.text
|
||||||
|
ldmxcsr (%eax)
|
9
gas/testsuite/gas/i386/property-vldmxcsr.d
Normal file
9
gas/testsuite/gas/i386/property-vldmxcsr.d
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#name: i386 property vldmxcsr
|
||||||
|
#as: -mx86-used-note=yes --generate-missing-build-notes=no
|
||||||
|
#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: x86-64-baseline, x86-64-v3
|
||||||
|
x86 feature used: x86, XMM
|
2
gas/testsuite/gas/i386/property-vldmxcsr.s
Normal file
2
gas/testsuite/gas/i386/property-vldmxcsr.s
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.text
|
||||||
|
vldmxcsr (%eax)
|
9
gas/testsuite/gas/i386/property-vzeroall.d
Normal file
9
gas/testsuite/gas/i386/property-vzeroall.d
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#name: i386 property vzeroall
|
||||||
|
#as: -mx86-used-note=yes --generate-missing-build-notes=no
|
||||||
|
#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: x86-64-baseline, x86-64-v3
|
||||||
|
x86 feature used: x86, XMM, YMM
|
2
gas/testsuite/gas/i386/property-vzeroall.s
Normal file
2
gas/testsuite/gas/i386/property-vzeroall.s
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.text
|
||||||
|
vzeroall
|
Reference in New Issue
Block a user