x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 9 Oct 2020 12:05:57 +0000 (05:05 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 9 Oct 2020 12:13:26 +0000 (05:13 -0700)
GCC 11 supports -march=x86-64-v[234] to enable x86 micro-architecture ISA
levels:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97250

Update GNU_PROPERTY_X86_ISA_1_XXX macros:

https://gitlab.com/x86-psABIs/x86-64-ABI/-/merge_requests/13

in x86 ELF binaries to indicate that micro-architecture ISA levels
required to execute the binary:

 #define GNU_PROPERTY_X86_ISA_1_NEEDED (GNU_PROPERTY_X86_UINT32_OR_LO + 2)
 #define GNU_PROPERTY_X86_ISA_1_USED (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 2)
 #define GNU_PROPERTY_X86_ISA_1_V2 (1U << 0)
 #define GNU_PROPERTY_X86_ISA_1_V3 (1U << 1)
 #define GNU_PROPERTY_X86_ISA_1_V4 (1U << 2)

The previous GNU_PROPERTY_X86_ISA_1_XXX  macros are deprecated and renamed
to GNU_PROPERTY_X86_COMPAT_2_ISA_1_XXX.

In addition to EM_X86_64, GNU_PROPERTY_X86_ISA_1_V[234] marker can be used
by ld.so to detect the x86-64-v4 shared library placed in an x86-64-v2
directory by mistake on an x86-64-v2 machine to avoid crashes on x86-64-v4
instructions.

Add -z x86-64-v[234] linker command line option to mark x86-64-v[234]
ISA level as needed.

Also add

 #define GNU_PROPERTY_X86_FEATURE_2_MASK (1U << 11)

for mask registers.

bfd/

PR gas/26703
* elf-linker-x86.h (elf_linker_x86_params): Add isa_level.
* elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Merge
GNU_PROPERTY_X86_ISA_1_V[234].
(_bfd_x86_elf_link_setup_gnu_properties): Generate
GNU_PROPERTY_X86_ISA_1_V[234] for -z x86-64-v[234].

binutils/

PR gas/26703
* readelf.c (decode_x86_compat_2_isa): New function.
(decode_x86_isa): Updated for new X86_ISA_1_XXX bits.
(decode_x86_feature_1): Handle GNU_PROPERTY_X86_FEATURE_2_MASK.
(print_gnu_property_note): Handle X86_COMPAT_2_ISA_1_USED,
and X86_COMPAT_2_ISA_1_NEEDED.
* testsuite/binutils-all/i386/pr21231b.s: Updated to the current
GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
values.
* testsuite/binutils-all/x86-64/pr21231b.s: Likewise.
* testsuite/binutils-all/x86-64/pr23494a.s: Likewise.
* testsuite/binutils-all/x86-64/pr23494b.s: Likewise.
* testsuite/binutils-all/x86-64/pr23494c.s: Likewise.
* testsuite/binutils-all/i386/empty.d: Updated.
* testsuite/binutils-all/i386/ibt.d: Likewise.
* testsuite/binutils-all/i386/pr21231a.d: Likewise.
* testsuite/binutils-all/i386/pr21231b.d: Likewise.
* testsuite/binutils-all/i386/shstk.d: Likewise.
* testsuite/binutils-all/x86-64/empty-x32.d: Likewise.
* testsuite/binutils-all/x86-64/empty.d: Likewise.
* testsuite/binutils-all/x86-64/ibt-x32.d: Likewise.
* testsuite/binutils-all/x86-64/ibt.d: Likewise.
* testsuite/binutils-all/x86-64/pr21231a.d: Likewise.
* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494e.d: Likewise.
* testsuite/binutils-all/x86-64/shstk-x32.d: Likewise.
* testsuite/binutils-all/x86-64/shstk.d: Likewise.

gas/

PR gas/26703
* config/tc-i386.c (xstate): Add xstate_mask.
(md_assemble): Check i.types[j], instead of i.tm.operand_types[j],
for xstate.  Set xstate_mask, instead of xstate_zmm, for RegMask.
(output_insn): Update for GNU_PROPERTY_X86_ISA_1_V[234].  Update
xstate for mask register and VSIB.
* testsuite/gas/i386/i386.exp: Run more GNU_PROPERTY tests.
* testsuite/gas/i386/property-1.s: Updated to the current
GNU_PROPERTY_X86_ISA_1_USED value.
* testsuite/gas/i386/property-2.s: Only keep cmove.
* testsuite/gas/i386/property-3.s: Changed to addsubpd.
* testsuite/gas/i386/property-1.d: Updated.
* testsuite/gas/i386/property-2.d: Likewise.
* testsuite/gas/i386/property-3.d: Likewise.
* testsuite/gas/i386/property-4.d: Likewise.
* testsuite/gas/i386/property-5.d: Likewise.
* testsuite/gas/i386/property-6.d: Likewise.
* testsuite/gas/i386/x86-64-property-1.d: Likewise.
* testsuite/gas/i386/x86-64-property-2.d: Likewise.
* testsuite/gas/i386/x86-64-property-3.d: Likewise.
* testsuite/gas/i386/x86-64-property-4.d: Likewise.
* testsuite/gas/i386/x86-64-property-5.d: Likewise.
* testsuite/gas/i386/x86-64-property-6.d: Likewise.
* testsuite/gas/i386/x86-64-property-7.d: Likewise.
* testsuite/gas/i386/x86-64-property-8.d: Likewise.
* testsuite/gas/i386/x86-64-property-9.d: Likewise.
* testsuite/gas/i386/property-11.d: New file.
* testsuite/gas/i386/property-11.s: Likewise.
* testsuite/gas/i386/property-12.d: Likewise.
* testsuite/gas/i386/property-12.s: Likewise.
* testsuite/gas/i386/property-13.d: Likewise.
* testsuite/gas/i386/property-13.s: Likewise.
* testsuite/gas/i386/x86-64-property-11.d: Likewise.
* testsuite/gas/i386/x86-64-property-12.d: Likewise.
* testsuite/gas/i386/x86-64-property-13.d: Likewise.
* testsuite/gas/i386/x86-64-property-14.d: Likewise.
* testsuite/gas/i386/x86-64-property-14.s: Likewise.

include/

PR gas/26703
* elf/common.h (GNU_PROPERTY_X86_ISA_1_USED): Renamed to ...
(GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED): This.
(GNU_PROPERTY_X86_ISA_1_NEEDED): Renamed to ...
(GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): This.
(GNU_PROPERTY_X86_ISA_1_XXX): Renamed to ...
(GNU_PROPERTY_X86_COMPAT_2_ISA_1_XXX): This.
(GNU_PROPERTY_X86_ISA_1_NEEDED): New.
(GNU_PROPERTY_X86_ISA_1_USED): Likewise.
(GNU_PROPERTY_X86_ISA_1_V2): Likewise.
(GNU_PROPERTY_X86_ISA_1_V3): Likewise.
(GNU_PROPERTY_X86_ISA_1_V4): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_MASK): Likewise.

ld/

PR gas/26703
* NEWS: Mention -z x86-64-v[234].
* ld.texi: Document -z x86-64-v[234].
* emulparams/elf32_x86_64.sh: Use x86-64-level.sh.
* emulparams/elf_i386.sh: Likewise.
* emulparams/elf_x86_64.sh: Likewise.
* emulparams/x86-64-level.sh: New file.
* testsuite/ld-elf/x86-feature-1a.rd: Update.
* testsuite/ld-elf/x86-feature-1b.rd: Likewise.
* testsuite/ld-elf/x86-feature-1c.rd: Likewise.
* testsuite/ld-elf/x86-feature-1d.rd: Likewise.
* testsuite/ld-elf/x86-feature-1e.rd: Likewise.
* testsuite/ld-i386/pr23372c.d: Likewise.
* testsuite/ld-i386/pr23486c.d: Likewise.
* testsuite/ld-i386/pr23486d.d: Likewise.
* testsuite/ld-i386/pr24322a.d: Likewise.
* testsuite/ld-i386/pr24322b.d: Likewise.
* testsuite/ld-i386/property-1a.r: Likewise.
* testsuite/ld-i386/property-2a.r: Likewise.
* testsuite/ld-i386/property-3.r: Likewise.
* testsuite/ld-i386/property-3a.r: Likewise.
* testsuite/ld-i386/property-4.r: Likewise.
* testsuite/ld-i386/property-4a.r: Likewise.
* testsuite/ld-i386/property-5.r: Likewise.
* testsuite/ld-i386/property-5a.r: Likewise.
* testsuite/ld-i386/property-7a.r: Likewise.
* testsuite/ld-i386/property-x86-3.d: Likewise.
* testsuite/ld-i386/property-x86-4a.d: Likewise.
* testsuite/ld-i386/property-x86-5.d: Likewise.
* testsuite/ld-i386/property-x86-cet1.d: Likewise.
* testsuite/ld-i386/property-x86-cet2a.d: Likewise.
* testsuite/ld-i386/property-x86-cet5a.d: Likewise.
* testsuite/ld-i386/property-x86-cet5b.d: Likewise.
* testsuite/ld-i386/property-x86-ibt1a.d: Likewise.
* testsuite/ld-i386/property-x86-ibt1b.d: Likewise.
* testsuite/ld-i386/property-x86-ibt2.d: Likewise.
* testsuite/ld-i386/property-x86-ibt3a.d: Likewise.
* testsuite/ld-i386/property-x86-ibt3b.d: Likewise.
* testsuite/ld-i386/property-x86-ibt4.d: Likewise.
* testsuite/ld-i386/property-x86-ibt5.d: Likewise.
* testsuite/ld-i386/property-x86-shstk1a.d: Likewise.
* testsuite/ld-i386/property-x86-shstk1b.d: Likewise.
* testsuite/ld-i386/property-x86-shstk2.d: Likewise.
* testsuite/ld-i386/property-x86-shstk3a.d: Likewise.
* testsuite/ld-i386/property-x86-shstk3b.d: Likewise.
* testsuite/ld-i386/property-x86-shstk4.d: Likewise.
* testsuite/ld-i386/property-x86-shstk5.d: Likewise.
* testsuite/ld-x86-64/pr23372c-x32.d: Likewise.
* testsuite/ld-x86-64/pr23372c.d: Likewise.
* testsuite/ld-x86-64/pr23486c.d: Likewise.
* testsuite/ld-x86-64/pr23486d-x32.d: Likewise.
* testsuite/ld-x86-64/pr23486d.d: Likewise.
* testsuite/ld-x86-64/pr24322a-x32.d: Likewise.
* testsuite/ld-x86-64/pr24322a.d: Likewise.
* testsuite/ld-x86-64/pr24322b-x32.d: Likewise.
* testsuite/ld-x86-64/pr24322b.d: Likewise.
* testsuite/ld-x86-64/pr24458a-x32.d: Likewise.
* testsuite/ld-x86-64/pr24458a.d: Likewise.
* testsuite/ld-x86-64/pr24458b-x32.d: Likewise.
* testsuite/ld-x86-64/pr24458b.d: Likewise.
* testsuite/ld-x86-64/pr24458c-x32.d: Likewise.
* testsuite/ld-x86-64/pr24458c.d: Likewise.
* testsuite/ld-x86-64/property-1a.r: Likewise.
* testsuite/ld-x86-64/property-2a.r: Likewise.
* testsuite/ld-x86-64/property-3.r: Likewise.
* testsuite/ld-x86-64/property-3a.r: Likewise.
* testsuite/ld-x86-64/property-4.r: Likewise.
* testsuite/ld-x86-64/property-4a.r: Likewise.
* testsuite/ld-x86-64/property-5.r: Likewise.
* testsuite/ld-x86-64/property-5a.r: Likewise.
* testsuite/ld-x86-64/property-7a.r: Likewise.
* testsuite/ld-x86-64/property-x86-3-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-3.d: Likewise.
* testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-4a.d: Likewise.
* testsuite/ld-x86-64/property-x86-5-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-5.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet1-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet1.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet2a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet2a.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet5a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet5a.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet5b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet5b.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt1a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt1a.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt1b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt1b.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt2-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt2.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt4-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt4.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt5-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt5.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk1a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk1a.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk1b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk1b.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk2-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk2.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk4-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk4.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk5-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk5.d: Likewise.
* testsuite/ld-i386/i386.exp: Run property-x86-6,
property-x86-isa1, property-x86-isa2 and property-x86-isa3.
* testsuite/ld-i386/property-x86-1.S: Updated to the current
GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
values.
* testsuite/ld-i386/property-x86-2.S: Likewise.
* testsuite/ld-i386/property-x86-3.s: Likewise.
* testsuite/ld-x86-64/pr23372d.s: Likewise.
* testsuite/ld-x86-64/pr23372e.s: Likewise.
* testsuite/ld-x86-64/pr23372f.s: Likewise.
* testsuite/ld-x86-64/pr23486c.s: Likewise.
* testsuite/ld-x86-64/pr23486d.s: Likewise.
* testsuite/ld-x86-64/property-x86-1.S: Likewise.
* testsuite/ld-x86-64/property-x86-2.S: Likewise.
* testsuite/ld-x86-64/property-x86-3.s: Likewise.
* testsuite/ld-x86-64/property-x86-5a.s: Likewise.
* testsuite/ld-x86-64/property-x86-5b.s: Likewise.
* testsuite/ld-i386/property-x86-6.d: New file.
* testsuite/ld-i386/property-x86-isa1.d: Likewise.
* testsuite/ld-i386/property-x86-isa2.d: Likewise.
* testsuite/ld-i386/property-x86-isa3.d: Likewise.
* testsuite/ld-x86-64/property-x86-6-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-6.d: Likewise.
* testsuite/ld-x86-64/property-x86-6.s: Likewise.
* testsuite/ld-x86-64/property-x86-isa1-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa1.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa1.s: Likewise.
* testsuite/ld-x86-64/property-x86-isa2-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa2.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa3-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa3.d: Likewise.
* testsuite/ld-x86-64/simple.s: Likewise.
* ld/testsuite/ld-x86-64/x86-64.exp: Run property-x86-6,
property-x86-6-x32, property-x86-isa1, property-x86-isa1-x32,
property-x86-isa2, property-x86-isa2-x32, property-x86-isa3-x32
and property-x86-isa3.

211 files changed:
bfd/ChangeLog
bfd/elf-linker-x86.h
bfd/elfxx-x86.c
binutils/ChangeLog
binutils/readelf.c
binutils/testsuite/binutils-all/i386/empty.d
binutils/testsuite/binutils-all/i386/ibt.d
binutils/testsuite/binutils-all/i386/pr21231a.d
binutils/testsuite/binutils-all/i386/pr21231b.d
binutils/testsuite/binutils-all/i386/pr21231b.s
binutils/testsuite/binutils-all/i386/shstk.d
binutils/testsuite/binutils-all/x86-64/empty-x32.d
binutils/testsuite/binutils-all/x86-64/empty.d
binutils/testsuite/binutils-all/x86-64/ibt-x32.d
binutils/testsuite/binutils-all/x86-64/ibt.d
binutils/testsuite/binutils-all/x86-64/pr21231a.d
binutils/testsuite/binutils-all/x86-64/pr21231b.d
binutils/testsuite/binutils-all/x86-64/pr21231b.s
binutils/testsuite/binutils-all/x86-64/pr23494a-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494a.d
binutils/testsuite/binutils-all/x86-64/pr23494a.s
binutils/testsuite/binutils-all/x86-64/pr23494b.s
binutils/testsuite/binutils-all/x86-64/pr23494c-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494c.d
binutils/testsuite/binutils-all/x86-64/pr23494c.s
binutils/testsuite/binutils-all/x86-64/pr23494d-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494d.d
binutils/testsuite/binutils-all/x86-64/pr23494e-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494e.d
binutils/testsuite/binutils-all/x86-64/shstk-x32.d
binutils/testsuite/binutils-all/x86-64/shstk.d
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/property-1.d
gas/testsuite/gas/i386/property-1.s
gas/testsuite/gas/i386/property-10.d
gas/testsuite/gas/i386/property-11.d [new file with mode: 0644]
gas/testsuite/gas/i386/property-11.s [new file with mode: 0644]
gas/testsuite/gas/i386/property-12.d [new file with mode: 0644]
gas/testsuite/gas/i386/property-12.s [new file with mode: 0644]
gas/testsuite/gas/i386/property-13.d [new file with mode: 0644]
gas/testsuite/gas/i386/property-13.s [new file with mode: 0644]
gas/testsuite/gas/i386/property-2.d
gas/testsuite/gas/i386/property-2.s
gas/testsuite/gas/i386/property-3.d
gas/testsuite/gas/i386/property-3.s
gas/testsuite/gas/i386/property-4.d
gas/testsuite/gas/i386/property-5.d
gas/testsuite/gas/i386/property-6.d
gas/testsuite/gas/i386/x86-64-property-1.d
gas/testsuite/gas/i386/x86-64-property-10.d
gas/testsuite/gas/i386/x86-64-property-11.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-property-12.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-property-13.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-property-14.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-property-14.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-property-2.d
gas/testsuite/gas/i386/x86-64-property-3.d
gas/testsuite/gas/i386/x86-64-property-4.d
gas/testsuite/gas/i386/x86-64-property-5.d
gas/testsuite/gas/i386/x86-64-property-6.d
gas/testsuite/gas/i386/x86-64-property-7.d
gas/testsuite/gas/i386/x86-64-property-8.d
gas/testsuite/gas/i386/x86-64-property-9.d
include/ChangeLog
include/elf/common.h
ld/ChangeLog
ld/NEWS
ld/emulparams/elf32_x86_64.sh
ld/emulparams/elf_i386.sh
ld/emulparams/elf_x86_64.sh
ld/emulparams/x86-64-level.sh [new file with mode: 0644]
ld/ld.texi
ld/testsuite/ld-elf/x86-feature-1a.rd
ld/testsuite/ld-elf/x86-feature-1b.rd
ld/testsuite/ld-elf/x86-feature-1c.rd
ld/testsuite/ld-elf/x86-feature-1d.rd
ld/testsuite/ld-elf/x86-feature-1e.rd
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/pr23372c.d
ld/testsuite/ld-i386/pr23486c.d
ld/testsuite/ld-i386/pr23486d.d
ld/testsuite/ld-i386/pr24322a.d
ld/testsuite/ld-i386/pr24322b.d
ld/testsuite/ld-i386/property-1a.r
ld/testsuite/ld-i386/property-2a.r
ld/testsuite/ld-i386/property-3.r
ld/testsuite/ld-i386/property-3a.r
ld/testsuite/ld-i386/property-4.r
ld/testsuite/ld-i386/property-4a.r
ld/testsuite/ld-i386/property-5.r
ld/testsuite/ld-i386/property-5a.r
ld/testsuite/ld-i386/property-7a.r
ld/testsuite/ld-i386/property-x86-1.S
ld/testsuite/ld-i386/property-x86-2.S
ld/testsuite/ld-i386/property-x86-3.d
ld/testsuite/ld-i386/property-x86-3.s
ld/testsuite/ld-i386/property-x86-4a.d
ld/testsuite/ld-i386/property-x86-5.d
ld/testsuite/ld-i386/property-x86-6.d [new file with mode: 0644]
ld/testsuite/ld-i386/property-x86-cet1.d
ld/testsuite/ld-i386/property-x86-cet2a.d
ld/testsuite/ld-i386/property-x86-cet5a.d
ld/testsuite/ld-i386/property-x86-cet5b.d
ld/testsuite/ld-i386/property-x86-ibt1a.d
ld/testsuite/ld-i386/property-x86-ibt1b.d
ld/testsuite/ld-i386/property-x86-ibt2.d
ld/testsuite/ld-i386/property-x86-ibt3a.d
ld/testsuite/ld-i386/property-x86-ibt3b.d
ld/testsuite/ld-i386/property-x86-ibt4.d
ld/testsuite/ld-i386/property-x86-ibt5.d
ld/testsuite/ld-i386/property-x86-isa1.d [new file with mode: 0644]
ld/testsuite/ld-i386/property-x86-isa2.d [new file with mode: 0644]
ld/testsuite/ld-i386/property-x86-isa3.d [new file with mode: 0644]
ld/testsuite/ld-i386/property-x86-shstk1a.d
ld/testsuite/ld-i386/property-x86-shstk1b.d
ld/testsuite/ld-i386/property-x86-shstk2.d
ld/testsuite/ld-i386/property-x86-shstk3a.d
ld/testsuite/ld-i386/property-x86-shstk3b.d
ld/testsuite/ld-i386/property-x86-shstk4.d
ld/testsuite/ld-i386/property-x86-shstk5.d
ld/testsuite/ld-x86-64/pr23372c-x32.d
ld/testsuite/ld-x86-64/pr23372c.d
ld/testsuite/ld-x86-64/pr23372d.s
ld/testsuite/ld-x86-64/pr23372e.s
ld/testsuite/ld-x86-64/pr23372f.s
ld/testsuite/ld-x86-64/pr23486c-x32.d
ld/testsuite/ld-x86-64/pr23486c.d
ld/testsuite/ld-x86-64/pr23486c.s
ld/testsuite/ld-x86-64/pr23486d-x32.d
ld/testsuite/ld-x86-64/pr23486d.d
ld/testsuite/ld-x86-64/pr23486d.s
ld/testsuite/ld-x86-64/pr24322a-x32.d
ld/testsuite/ld-x86-64/pr24322a.d
ld/testsuite/ld-x86-64/pr24322b-x32.d
ld/testsuite/ld-x86-64/pr24322b.d
ld/testsuite/ld-x86-64/pr24458a-x32.d
ld/testsuite/ld-x86-64/pr24458a.d
ld/testsuite/ld-x86-64/pr24458b-x32.d
ld/testsuite/ld-x86-64/pr24458b.d
ld/testsuite/ld-x86-64/pr24458c-x32.d
ld/testsuite/ld-x86-64/pr24458c.d
ld/testsuite/ld-x86-64/property-1a.r
ld/testsuite/ld-x86-64/property-2a.r
ld/testsuite/ld-x86-64/property-3.r
ld/testsuite/ld-x86-64/property-3a.r
ld/testsuite/ld-x86-64/property-4.r
ld/testsuite/ld-x86-64/property-4a.r
ld/testsuite/ld-x86-64/property-5.r
ld/testsuite/ld-x86-64/property-5a.r
ld/testsuite/ld-x86-64/property-7a.r
ld/testsuite/ld-x86-64/property-x86-1.S
ld/testsuite/ld-x86-64/property-x86-2.S
ld/testsuite/ld-x86-64/property-x86-3-x32.d
ld/testsuite/ld-x86-64/property-x86-3.d
ld/testsuite/ld-x86-64/property-x86-3.s
ld/testsuite/ld-x86-64/property-x86-4a-x32.d
ld/testsuite/ld-x86-64/property-x86-4a.d
ld/testsuite/ld-x86-64/property-x86-5-x32.d
ld/testsuite/ld-x86-64/property-x86-5.d
ld/testsuite/ld-x86-64/property-x86-5a.s
ld/testsuite/ld-x86-64/property-x86-5b.s
ld/testsuite/ld-x86-64/property-x86-6-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-6.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-6.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-cet1-x32.d
ld/testsuite/ld-x86-64/property-x86-cet1.d
ld/testsuite/ld-x86-64/property-x86-cet2a-x32.d
ld/testsuite/ld-x86-64/property-x86-cet2a.d
ld/testsuite/ld-x86-64/property-x86-cet5a-x32.d
ld/testsuite/ld-x86-64/property-x86-cet5a.d
ld/testsuite/ld-x86-64/property-x86-cet5b-x32.d
ld/testsuite/ld-x86-64/property-x86-cet5b.d
ld/testsuite/ld-x86-64/property-x86-ibt1a-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt1a.d
ld/testsuite/ld-x86-64/property-x86-ibt1b-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt1b.d
ld/testsuite/ld-x86-64/property-x86-ibt2-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt2.d
ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt3a.d
ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt3b.d
ld/testsuite/ld-x86-64/property-x86-ibt4-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt4.d
ld/testsuite/ld-x86-64/property-x86-ibt5-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt5.d
ld/testsuite/ld-x86-64/property-x86-isa1-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-isa1.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-isa1.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-isa2-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-isa2.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-isa3-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-isa3.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-shstk1a-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk1a.d
ld/testsuite/ld-x86-64/property-x86-shstk1b-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk1b.d
ld/testsuite/ld-x86-64/property-x86-shstk2-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk2.d
ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk3a.d
ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk3b.d
ld/testsuite/ld-x86-64/property-x86-shstk4-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk4.d
ld/testsuite/ld-x86-64/property-x86-shstk5-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk5.d
ld/testsuite/ld-x86-64/simple.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp

index 468c6f64c31450bb43a917427fea868c24eea610..9650b3d827c3453ca37559ed2ed52eafb7970164 100644 (file)
@@ -1,3 +1,12 @@
+2020-10-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/26703
+       * elf-linker-x86.h (elf_linker_x86_params): Add isa_level.
+       * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Merge
+       GNU_PROPERTY_X86_ISA_1_V[234].
+       (_bfd_x86_elf_link_setup_gnu_properties): Generate
+       GNU_PROPERTY_X86_ISA_1_V[234] for -z x86-64-v[234].
+
 2020-10-06  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/26711
index d0cb20dde527944e1268e16828e5e66b31d18181..77e81960ab7fda2a82383a14e59f5925e5bfa4a6 100644 (file)
@@ -55,6 +55,9 @@ struct elf_linker_x86_params
   /* TRUE if --dynamic-linker is passed at command-line.  */
   unsigned int has_dynamic_linker : 1;
 
+  /* X86-64 ISA level needed.  */
+  unsigned int isa_level;
+
   /* Report missing IBT and SHSTK properties.  */
   enum elf_x86_cet_report cet_report;
 
index 143aae4b5cc273f783d4669a472c1a1775875cc8..4a0360fb098a47131f51f1a31acfe482b15d3af1 100644 (file)
@@ -2337,6 +2337,8 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
 {
   unsigned int number, features;
   bfd_boolean updated = FALSE;
+  const struct elf_backend_data *bed;
+  struct elf_x86_link_hash_table *htab;
   unsigned int pr_type = aprop != NULL ? aprop->pr_type : bprop->pr_type;
 
   if (pr_type == GNU_PROPERTY_X86_COMPAT_ISA_1_USED
@@ -2366,10 +2368,32 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
           || (pr_type >= GNU_PROPERTY_X86_UINT32_OR_LO
               && pr_type <= GNU_PROPERTY_X86_UINT32_OR_HI))
     {
+      features = 0;
+      if (pr_type == GNU_PROPERTY_X86_ISA_1_NEEDED)
+       {
+         bed = get_elf_backend_data (info->output_bfd);
+         htab = elf_x86_hash_table (info, bed->target_id);
+         switch (htab->params->isa_level)
+           {
+           case 0:
+             break;
+           case 2:
+             features = GNU_PROPERTY_X86_ISA_1_V2;
+             break;
+           case 3:
+             features = GNU_PROPERTY_X86_ISA_1_V3;
+             break;
+           case 4:
+             features = GNU_PROPERTY_X86_ISA_1_V4;
+             break;
+           default:
+             abort ();
+           }
+       }
       if (aprop != NULL && bprop != NULL)
        {
          number = aprop->u.number;
-         aprop->u.number = number | bprop->u.number;
+         aprop->u.number = number | bprop->u.number | features;
          /* Remove the property if all bits are empty.  */
          if (aprop->u.number == 0)
            {
@@ -2384,6 +2408,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
          /* Only one of APROP and BPROP can be NULL.  */
          if (aprop != NULL)
            {
+             aprop->u.number |= features;
              if (aprop->u.number == 0)
                {
                  /* Remove APROP if all bits are empty.  */
@@ -2396,6 +2421,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
              /* Return TRUE if APROP is NULL and all bits of BPROP
                 aren't empty to indicate that BPROP should be added
                 to ABFD.  */
+             bprop->u.number |= features;
              updated = bprop->u.number != 0;
            }
        }
@@ -2409,10 +2435,8 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
         2. If APROP is NULL, remove x86 feature.
         3. Otherwise, do nothing.
        */
-      const struct elf_backend_data *bed
-       = get_elf_backend_data (info->output_bfd);
-      struct elf_x86_link_hash_table *htab
-       = elf_x86_hash_table (info, bed->target_id);
+      bed = get_elf_backend_data (info->output_bfd);
+      htab = elf_x86_hash_table (info, bed->target_id);
       if (!htab)
        abort ();
       if (aprop != NULL && bprop != NULL)
@@ -2490,7 +2514,7 @@ _bfd_x86_elf_link_setup_gnu_properties
   asection *sec, *pltsec;
   bfd *dynobj;
   bfd_boolean use_ibt_plt;
-  unsigned int plt_alignment, features;
+  unsigned int plt_alignment, features, isa_level;
   struct elf_x86_link_hash_table *htab;
   bfd *pbfd;
   bfd *ebfd = NULL;
@@ -2532,6 +2556,24 @@ _bfd_x86_elf_link_setup_gnu_properties
   if (!(htab->params->cet_report & (cet_report_ibt | cet_report_shstk)))
     htab->params->cet_report = cet_report_none;
 
+  switch (htab->params->isa_level)
+    {
+    case 0:
+      isa_level = 0;
+      break;
+    case 2:
+      isa_level = GNU_PROPERTY_X86_ISA_1_V2;
+      break;
+    case 3:
+      isa_level = GNU_PROPERTY_X86_ISA_1_V3;
+      break;
+    case 4:
+      isa_level = GNU_PROPERTY_X86_ISA_1_V4;
+      break;
+    default:
+      abort ();
+    }
+
   if (ebfd != NULL)
     {
       prop = NULL;
@@ -2546,6 +2588,16 @@ _bfd_x86_elf_link_setup_gnu_properties
          prop->pr_kind = property_number;
        }
 
+      if (isa_level)
+       {
+         /* If ISA level is set, add GNU_PROPERTY_X86_ISA_1_NEEDED.  */
+         prop = _bfd_elf_get_property (ebfd,
+                                       GNU_PROPERTY_X86_ISA_1_NEEDED,
+                                       4);
+         prop->u.number |= isa_level;
+         prop->pr_kind = property_number;
+       }
+
       /* Create the GNU property note section if needed.  */
       if (prop != NULL && pbfd == NULL)
        {
index b751eeec5e21cf85e7ea21b8b76ae98e43592548..ed05b24acfd6fb0b21a4623729db6a7c963f5aee 100644 (file)
@@ -1,3 +1,40 @@
+2020-10-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/26703
+       * readelf.c (decode_x86_compat_2_isa): New function.
+       (decode_x86_isa): Updated for new X86_ISA_1_XXX bits.
+       (decode_x86_feature_1): Handle GNU_PROPERTY_X86_FEATURE_2_MASK.
+       (print_gnu_property_note): Handle X86_COMPAT_2_ISA_1_USED,
+       and X86_COMPAT_2_ISA_1_NEEDED.
+       * testsuite/binutils-all/i386/pr21231b.s: Updated to the current
+       GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
+       values.
+       * testsuite/binutils-all/x86-64/pr21231b.s: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494a.s: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494b.s: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494c.s: Likewise.
+       * testsuite/binutils-all/i386/empty.d: Updated.
+       * testsuite/binutils-all/i386/ibt.d: Likewise.
+       * testsuite/binutils-all/i386/pr21231a.d: Likewise.
+       * testsuite/binutils-all/i386/pr21231b.d: Likewise.
+       * testsuite/binutils-all/i386/shstk.d: Likewise.
+       * testsuite/binutils-all/x86-64/empty-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/empty.d: Likewise.
+       * testsuite/binutils-all/x86-64/ibt-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/ibt.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr21231a.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494e.d: Likewise.
+       * testsuite/binutils-all/x86-64/shstk-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/shstk.d: Likewise.
+
 2020-10-06  Nick Clifton  <nickc@redhat.com>
 
        * objcopy.c (copy_object): Compare input and output sections by
index 9ba4e29a6595398e64060b090d4f9da8f10fd155..33ae4e527f6d2ae1b4c6e0d0d2b5acc2c13540f3 100644 (file)
@@ -18225,7 +18225,7 @@ decode_x86_compat_isa (unsigned int bitmask)
 }
 
 static void
-decode_x86_isa (unsigned int bitmask)
+decode_x86_compat_2_isa (unsigned int bitmask)
 {
   if (!bitmask)
     {
@@ -18240,79 +18240,79 @@ decode_x86_isa (unsigned int bitmask)
       bitmask &= ~ bit;
       switch (bit)
        {
-       case GNU_PROPERTY_X86_ISA_1_CMOV:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_CMOV:
          printf ("CMOV");
          break;
-       case GNU_PROPERTY_X86_ISA_1_SSE:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE:
          printf ("SSE");
          break;
-       case GNU_PROPERTY_X86_ISA_1_SSE2:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE2:
          printf ("SSE2");
          break;
-       case GNU_PROPERTY_X86_ISA_1_SSE3:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE3:
          printf ("SSE3");
          break;
-       case GNU_PROPERTY_X86_ISA_1_SSSE3:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSSE3:
          printf ("SSSE3");
          break;
-       case GNU_PROPERTY_X86_ISA_1_SSE4_1:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE4_1:
          printf ("SSE4_1");
          break;
-       case GNU_PROPERTY_X86_ISA_1_SSE4_2:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE4_2:
          printf ("SSE4_2");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX:
          printf ("AVX");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX2:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX2:
          printf ("AVX2");
          break;
-       case GNU_PROPERTY_X86_ISA_1_FMA:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_FMA:
          printf ("FMA");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512F:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512F:
          printf ("AVX512F");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512CD:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512CD:
          printf ("AVX512CD");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512ER:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512ER:
          printf ("AVX512ER");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512PF:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512PF:
          printf ("AVX512PF");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512VL:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512VL:
          printf ("AVX512VL");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512DQ:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512DQ:
          printf ("AVX512DQ");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512BW:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512BW:
          printf ("AVX512BW");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512_4FMAPS:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_4FMAPS:
          printf ("AVX512_4FMAPS");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_4VNNIW:
          printf ("AVX512_4VNNIW");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512_BITALG:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_BITALG:
          printf ("AVX512_BITALG");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512_IFMA:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_IFMA:
          printf ("AVX512_IFMA");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512_VBMI:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_VBMI:
          printf ("AVX512_VBMI");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_VBMI2:
          printf ("AVX512_VBMI2");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512_VNNI:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_VNNI:
          printf ("AVX512_VNNI");
          break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512_BF16:
+       case GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_BF16:
          printf ("AVX512_BF16");
          break;
        default:
@@ -18324,6 +18324,40 @@ decode_x86_isa (unsigned int bitmask)
     }
 }
 
+static void
+decode_x86_isa (unsigned int bitmask)
+{
+  if (!bitmask)
+    {
+      printf (_("x86-64-baseline"));
+      return;
+    }
+
+  while (bitmask)
+    {
+      unsigned int bit = bitmask & (- bitmask);
+
+      bitmask &= ~ bit;
+      switch (bit)
+       {
+       case GNU_PROPERTY_X86_ISA_1_V2:
+         printf ("x86-64-v2");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_V3:
+         printf ("x86-64-v3");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_V4:
+         printf ("x86-64-v4");
+         break;
+       default:
+         printf (_("<unknown: %x>"), bit);
+         break;
+       }
+      if (bitmask)
+       printf (", ");
+    }
+}
+
 static void
 decode_x86_feature_1 (unsigned int bitmask)
 {
@@ -18392,6 +18426,9 @@ decode_x86_feature_2 (unsigned int bitmask)
        case GNU_PROPERTY_X86_FEATURE_2_TMM:
          printf ("TMM");
          break;
+       case GNU_PROPERTY_X86_FEATURE_2_MASK:
+         printf ("MASK");
+         break;
        case GNU_PROPERTY_X86_FEATURE_2_FXSR:
          printf ("FXSR");
          break;
@@ -18570,6 +18607,28 @@ print_gnu_property_note (Filedata * filedata, Elf_Internal_Note * pnote)
                    }
                  goto next;
 
+               case GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED:
+                 if (datasz != 4)
+                   printf (_("x86 ISA used: <corrupt length: %#x> "),
+                           datasz);
+                 else
+                   {
+                     printf ("x86 ISA used: ");
+                     decode_x86_compat_2_isa (bitmask);
+                   }
+                 goto next;
+
+               case GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED:
+                 if (datasz != 4)
+                   printf (_("x86 ISA needed: <corrupt length: %#x> "),
+                           datasz);
+                 else
+                   {
+                     printf ("x86 ISA needed: ");
+                     decode_x86_compat_2_isa (bitmask);
+                   }
+                 goto next;
+
                default:
                  break;
                }
index 84837ba91af2f7fb2af0b9b32ae42d73c9fc6c85..ec54389be6e45302c36df8c2f32084b4d22f8e30 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: <None>
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 7698a8ec76830ad713b43d277c04571e8b8cffb6..7723d70bf09022f376f745bc7b62d9a096aa5b6c 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 6c49a4981a7395d895231f38290e16d5afbd3f6f..657784d4f08eb0c61c8a51e6897af63b79dcc8bc 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x00000008      NT_GNU_PROPERTY_TYPE_0
       Properties: no copy on protected 
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 921345d31c391af4f212e9b7523f0c43ce5e5ddd..77ef4e635e8eccf772f454d0a1580f899cdaa786 100644 (file)
@@ -8,8 +8,8 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x0000002c      NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
        no copy on protected 
-       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, AVX512_BF16, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>
-       x86 ISA needed: CMOV, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, FMA, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ
+       x86 ISA used: x86-64-v2, x86-64-v3, x86-64-v4, <unknown: 8>, <unknown: 10>, <unknown: 20>, <unknown: 40>, <unknown: 80>, <unknown: 100>, <unknown: 200>, <unknown: 400>, <unknown: 800>, <unknown: 1000>, <unknown: 2000>, <unknown: 4000>, <unknown: 8000>, <unknown: 10000>, <unknown: 20000>, <unknown: 40000>, <unknown: 80000>, <unknown: 100000>, <unknown: 200000>, <unknown: 400000>, <unknown: 800000>, <unknown: 1000000>, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>
+       x86 ISA needed: x86-64-v2, x86-64-v3, x86-64-v4, <unknown: 8>, <unknown: 10>, <unknown: 20>, <unknown: 40>, <unknown: 80>, <unknown: 100>, <unknown: 200>, <unknown: 400>, <unknown: 800>, <unknown: 1000>, <unknown: 2000>, <unknown: 4000>, <unknown: 8000>
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 1fd2575e2a653e0284e6ef40c0a81e2a25cd1f89..67cd08dbfb82fcbae2404033586e3b3c7b1bf4ee 100644 (file)
        .long 0                 /* pr_datasz.  */
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 4f - 3f           /* pr_datasz.  */
 3:
        .long 0x7fffffff
 4:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 4f - 3f           /* pr_datasz.  */
 3:
        .long 0xffff
index c2b5bece60465ae393cc9698ba743cba5a30382e..8d2e9f2969043f7de61913cb7b6bb433119601af 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 2e6dc429aaab42f58e2367e44823950b980cf335..820996bbd9be0990f28b99ce491661e709c15f81 100644 (file)
@@ -9,5 +9,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: <None>
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index f66f0fcd794f3ca3c1e99a68056295a6e51be3b5..0f9d8ceca5541f16c2e17aa10ba8cd1ba743f5f4 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: <None>
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 21a7abe9e78cee8ca080d8dd70c0a62257926d60..490938a2cc5f4fa76097ea3b760d49af274eeeaf 100644 (file)
@@ -9,5 +9,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 086076151fad7fb8c9899eb6eb02e9e733a79389..500ab54e4d4f59a827d8925bc58ce0fbe2abb99a 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 4e2c8e375817ca8645dc0ffb496b542fd65c40f5..f643a78a6eee5f2afd9a1f876e99e6f898b41250 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x00000008      NT_GNU_PROPERTY_TYPE_0
       Properties: no copy on protected 
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index e1ca772363b73b32e3fd389138d856dd45fb8746..e9a185f16741cddcd45b53c474e2a6ffac6a8a33 100644 (file)
@@ -8,8 +8,8 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x00000038      NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
        no copy on protected 
-       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, AVX512_BF16, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>
-       x86 ISA needed: CMOV, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, FMA, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ
+       x86 ISA used: x86-64-v2, x86-64-v3, x86-64-v4, <unknown: 8>, <unknown: 10>, <unknown: 20>, <unknown: 40>, <unknown: 80>, <unknown: 100>, <unknown: 200>, <unknown: 400>, <unknown: 800>, <unknown: 1000>, <unknown: 2000>, <unknown: 4000>, <unknown: 8000>, <unknown: 10000>, <unknown: 20000>, <unknown: 40000>, <unknown: 80000>, <unknown: 100000>, <unknown: 200000>, <unknown: 400000>, <unknown: 800000>, <unknown: 1000000>, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>
+       x86 ISA needed: x86-64-v2, x86-64-v3, x86-64-v4, <unknown: 8>, <unknown: 10>, <unknown: 20>, <unknown: 40>, <unknown: 80>, <unknown: 100>, <unknown: 200>, <unknown: 400>, <unknown: 800>, <unknown: 1000>, <unknown: 2000>, <unknown: 4000>, <unknown: 8000>
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 8fefebdb2ff44476d572592eb070a37c56a84051..1feea55169ba6ad319e5e245a46b5e7c44a37ae5 100644 (file)
        .long 0                 /* pr_datasz.  */
        .p2align 3
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 4f - 3f           /* pr_datasz.  */
 3:
        .long 0x7fffffff
 4:
        .p2align 3
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 4f - 3f           /* pr_datasz.  */
 3:
        .long 0xffff
index 819551725ca5ab2cd533c418d6cdb0490d8c9adf..018809c6cfb888db284e8006d07c1ae0d98a9557 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE4_1, AVX
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 906273331d3b171a21eb4e30540a24aed4856581..dab7d1859cbfad3c7d054ee1b9cda0dc27f78aa6 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE4_1, AVX
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 26f7139510a90dbb042cd796987bc6c2b2e7b253..a36d303a131c02eb501e49297f53f24a02eaf4bc 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
@@ -48,7 +48,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
@@ -79,7 +79,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
index 75a8d5aa7df684c02b2aeb01e65d838b4a14fb1c..aa3cdb5f820ea9e578b214bc930d3d4a50655fc7 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
index 188705b18ace72a87a23893e673bec10e3649fab..05f32635ced3cd3cd5d02500753835486b53c399 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: SSE, SSE3
+      Properties: x86 ISA used: x86-64-v3, <unknown: 8>
index 7fff8e6641cd2d1cf781aa3690271b57655d28a0..6b0d4f348e1c527c19ec22bff143a09dd395e7ab 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: SSE, SSE3
+      Properties: x86 ISA used: x86-64-v3, <unknown: 8>
index 474182cfb01ac76c7d8e9ae46f0503c98800211a..0109bdba27246f38f6c5cfcf281ad0322c600642 100644 (file)
@@ -48,7 +48,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
@@ -79,7 +79,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
index eaf5438e1b85395ba850504d413e29471cdfc740..385cbdbc4e1cc564df83c37ae6fdc8b8816f8099 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE4_1, AVX
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index ef70683dbfcb59ea8f3ac9cab315f24c4fbeef3a..45e9a39aff8f40a356fe86abbb7288b13becdfc1 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE4_1, AVX
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 62c655d99fbe39103cfa478f88a6400394b78457..968262a9d7a112e0ccf321aa438136777f9f4055 100644 (file)
@@ -8,6 +8,6 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000040      NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0xffffffff
-       x86 ISA needed: SSE4_1, AVX
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+       x86 ISA needed: <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 6423bbf44d8efae3cfd01eaca6c55ea0cf845427..bbd9e21d58894c25711349fc94c60dfba5a7dd74 100644 (file)
@@ -8,6 +8,6 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0xffffffff
-       x86 ISA needed: SSE4_1, AVX
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+       x86 ISA needed: <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index e8918b1b3cb4702a2a61a4876cfcde09b5e9517e..b798d887410f519c5d3ab17173c23904fc8ad326 100644 (file)
@@ -9,5 +9,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 425883436f235bfd07ef6ce12f89c1a4e415be4c..7523e453ecb6500477836df73a1ecddc8708bfbc 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86
index 26cae9c15d4c1fe0f5bcb92090d4ed0b63315f04..0eb9cd90bf30b3203f5262d7317057fa6371d661 100644 (file)
@@ -1,3 +1,43 @@
+2020-10-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/26703
+       * config/tc-i386.c (xstate): Add xstate_mask.
+       (md_assemble): Check i.types[j], instead of i.tm.operand_types[j],
+       for xstate.  Set xstate_mask, instead of xstate_zmm, for RegMask.
+       (output_insn): Update for GNU_PROPERTY_X86_ISA_1_V[234].  Update
+       xstate for mask register and VSIB.
+       * testsuite/gas/i386/i386.exp: Run more GNU_PROPERTY tests.
+       * testsuite/gas/i386/property-1.s: Updated to the current
+       GNU_PROPERTY_X86_ISA_1_USED value.
+       * testsuite/gas/i386/property-2.s: Only keep cmove.
+       * testsuite/gas/i386/property-3.s: Changed to addsubpd.
+       * testsuite/gas/i386/property-1.d: Updated.
+       * testsuite/gas/i386/property-2.d: Likewise.
+       * testsuite/gas/i386/property-3.d: Likewise.
+       * testsuite/gas/i386/property-4.d: Likewise.
+       * testsuite/gas/i386/property-5.d: Likewise.
+       * testsuite/gas/i386/property-6.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-1.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-2.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-3.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-4.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-5.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-6.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-7.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-8.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-9.d: Likewise.
+       * testsuite/gas/i386/property-11.d: New file.
+       * testsuite/gas/i386/property-11.s: Likewise.
+       * testsuite/gas/i386/property-12.d: Likewise.
+       * testsuite/gas/i386/property-12.s: Likewise.
+       * testsuite/gas/i386/property-13.d: Likewise.
+       * testsuite/gas/i386/property-13.s: Likewise.
+       * testsuite/gas/i386/x86-64-property-11.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-12.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-13.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-14.d: Likewise.
+       * testsuite/gas/i386/x86-64-property-14.s: Likewise.
+
 2020-10-06  Alex Coplan  <alex.coplan@arm.com>
 
        PR 26699
index f3eaba6231e95f7c7711dbc2bace1b08bd9c5bca..64cd78c8ee9d1d8c8aee274fc1b5f909fa6e955a 100644 (file)
@@ -374,7 +374,9 @@ struct _i386_insn
        /* Use ZMM state.  */
        xstate_zmm = 1 << 3 | xstate_ymm,
        /* Use TMM state.  */
-       xstate_tmm = 1 << 4
+       xstate_tmm = 1 << 4,
+       /* Use MASK state.  */
+       xstate_mask = 1 << 5
       } xstate;
 
     /* Has GOTPC or TLS relocation.  */
@@ -4860,7 +4862,7 @@ md_assemble (char *line)
   for (j = 0; j < i.operands; j++)
     {
       i.types[j] = operand_type_and (i.types[j], i.tm.operand_types[j]);
-      switch (i.tm.operand_types[j].bitfield.class)
+      switch (i.types[j].bitfield.class)
        {
        default:
          break;
@@ -4868,16 +4870,16 @@ md_assemble (char *line)
          i.xstate |= xstate_mmx;
          break;
        case RegMask:
-         i.xstate |= xstate_zmm;
+         i.xstate |= xstate_mask;
          break;
        case RegSIMD:
-         if (i.tm.operand_types[j].bitfield.tmmword)
+         if (i.types[j].bitfield.tmmword)
            i.xstate |= xstate_tmm;
-         else if (i.tm.operand_types[j].bitfield.zmmword)
+         else if (i.types[j].bitfield.zmmword)
            i.xstate |= xstate_zmm;
-         else if (i.tm.operand_types[j].bitfield.ymmword)
+         else if (i.types[j].bitfield.ymmword)
            i.xstate |= xstate_ymm;
-         else if (i.tm.operand_types[j].bitfield.xmmword)
+         else if (i.types[j].bitfield.xmmword)
            i.xstate |= xstate_xmm;
          break;
        }
@@ -9167,56 +9169,51 @@ output_insn (void)
 #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
   if (IS_ELF && x86_used_note && now_seg != absolute_section)
     {
-      if (i.tm.cpu_flags.bitfield.cpucmov)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_CMOV;
-      if (i.tm.cpu_flags.bitfield.cpusse)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_SSE;
-      if (i.tm.cpu_flags.bitfield.cpusse2)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_SSE2;
-      if (i.tm.cpu_flags.bitfield.cpusse3)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_SSE3;
-      if (i.tm.cpu_flags.bitfield.cpussse3)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_SSSE3;
-      if (i.tm.cpu_flags.bitfield.cpusse4_1)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_SSE4_1;
-      if (i.tm.cpu_flags.bitfield.cpusse4_2)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_SSE4_2;
-      if (i.tm.cpu_flags.bitfield.cpuavx)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX;
-      if (i.tm.cpu_flags.bitfield.cpuavx2)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX2;
-      if (i.tm.cpu_flags.bitfield.cpufma)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_FMA;
-      if (i.tm.cpu_flags.bitfield.cpuavx512f)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512F;
-      if (i.tm.cpu_flags.bitfield.cpuavx512cd)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512CD;
-      if (i.tm.cpu_flags.bitfield.cpuavx512er)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512ER;
-      if (i.tm.cpu_flags.bitfield.cpuavx512pf)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512PF;
-      if (i.tm.cpu_flags.bitfield.cpuavx512vl)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512VL;
-      if (i.tm.cpu_flags.bitfield.cpuavx512dq)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512DQ;
-      if (i.tm.cpu_flags.bitfield.cpuavx512bw)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512BW;
-      if (i.tm.cpu_flags.bitfield.cpuavx512_4fmaps)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512_4FMAPS;
-      if (i.tm.cpu_flags.bitfield.cpuavx512_4vnniw)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW;
-      if (i.tm.cpu_flags.bitfield.cpuavx512_bitalg)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512_BITALG;
-      if (i.tm.cpu_flags.bitfield.cpuavx512ifma)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512_IFMA;
-      if (i.tm.cpu_flags.bitfield.cpuavx512vbmi)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512_VBMI;
-      if (i.tm.cpu_flags.bitfield.cpuavx512_vbmi2)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2;
-      if (i.tm.cpu_flags.bitfield.cpuavx512_vnni)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512_VNNI;
-      if (i.tm.cpu_flags.bitfield.cpuavx512_bf16)
-       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_AVX512_BF16;
+      if ((i.xstate & xstate_tmm) == xstate_tmm
+         || i.tm.cpu_flags.bitfield.cpuamx_tile)
+       x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_TMM;
+
+      if (i.tm.cpu_flags.bitfield.cpusse3
+         || i.tm.cpu_flags.bitfield.cpussse3
+         || i.tm.cpu_flags.bitfield.cpusse4_1
+         || i.tm.cpu_flags.bitfield.cpusse4_2
+         || i.tm.cpu_flags.bitfield.cpucx16
+         || i.tm.cpu_flags.bitfield.cpupopcnt
+         /* LAHF-SAHF insns in 64-bit mode.  */
+         || (flag_code == CODE_64BIT
+             && (i.tm.base_opcode | 1) == 0x9f))
+       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_V2;
+      if (i.tm.cpu_flags.bitfield.cpuavx
+         || i.tm.cpu_flags.bitfield.cpuavx2
+         /* Any VEX encoded insns execpt for CpuAVX512F, CpuAVX512BW,
+            CpuAVX512DQ, LPW, TBM and AMX.  */
+         || (i.tm.opcode_modifier.vex
+             && !i.tm.cpu_flags.bitfield.cpuavx512f
+             && !i.tm.cpu_flags.bitfield.cpuavx512bw
+             && !i.tm.cpu_flags.bitfield.cpuavx512dq
+             && !i.tm.cpu_flags.bitfield.cpulwp
+             && !i.tm.cpu_flags.bitfield.cputbm
+             && !(x86_feature_2_used & GNU_PROPERTY_X86_FEATURE_2_TMM))
+         || i.tm.cpu_flags.bitfield.cpuf16c
+         || i.tm.cpu_flags.bitfield.cpufma
+         || i.tm.cpu_flags.bitfield.cpulzcnt
+         || i.tm.cpu_flags.bitfield.cpumovbe
+         || i.tm.cpu_flags.bitfield.cpuxsave
+         || i.tm.cpu_flags.bitfield.cpuxsavec
+         || i.tm.cpu_flags.bitfield.cpuxsaveopt
+         || i.tm.cpu_flags.bitfield.cpuxsaves)
+       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_V3;
+      if (i.tm.cpu_flags.bitfield.cpuavx512f
+         || i.tm.cpu_flags.bitfield.cpuavx512bw
+         || i.tm.cpu_flags.bitfield.cpuavx512dq
+         || i.tm.cpu_flags.bitfield.cpuavx512vl
+         /* Any EVEX encoded insns except for AVX512ER, AVX512PF and
+            VNNIW.  */
+         || (i.tm.opcode_modifier.evex
+             && !i.tm.cpu_flags.bitfield.cpuavx512er
+             && !i.tm.cpu_flags.bitfield.cpuavx512pf
+             && !i.tm.cpu_flags.bitfield.cpuavx512_4vnniw))
+       x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_V4;
 
       if (i.tm.cpu_flags.bitfield.cpu8087
          || i.tm.cpu_flags.bitfield.cpu287
@@ -9228,6 +9225,15 @@ output_insn (void)
          || i.tm.base_opcode == 0xf77 /* emms */
          || i.tm.base_opcode == 0xf0e /* femms */)
        x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_MMX;
+      if (i.index_reg)
+       {
+         if (i.index_reg->reg_type.bitfield.zmmword)
+           i.xstate |= xstate_zmm;
+         else if (i.index_reg->reg_type.bitfield.ymmword)
+           i.xstate |= xstate_ymm;
+         else if (i.index_reg->reg_type.bitfield.xmmword)
+           i.xstate |= xstate_xmm;
+       }
       if ((i.xstate & xstate_xmm)
          || i.tm.cpu_flags.bitfield.cpuwidekl
          || i.tm.cpu_flags.bitfield.cpukl)
@@ -9236,6 +9242,8 @@ output_insn (void)
        x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_YMM;
       if ((i.xstate & xstate_zmm) == xstate_zmm)
        x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_ZMM;
+      if (i.mask || (i.xstate & xstate_mask) == xstate_mask)
+       x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_MASK;
       if (i.tm.cpu_flags.bitfield.cpufxsr)
        x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_FXSR;
       if (i.tm.cpu_flags.bitfield.cpuxsave)
@@ -9244,10 +9252,6 @@ output_insn (void)
        x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_XSAVEOPT;
       if (i.tm.cpu_flags.bitfield.cpuxsavec)
        x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_XSAVEC;
-
-      if ((i.xstate & xstate_tmm) == xstate_tmm
-         || i.tm.cpu_flags.bitfield.cpuamx_tile)
-       x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_TMM;
     }
 #endif
 
index 3a1ebda494aaab9bdf842ae34a72408e05984aeb..8645f3061c2cfca8de3e0c8ef5dad38c550c1af7 100644 (file)
@@ -645,6 +645,9 @@ if [gas_32_check] then {
        run_dump_test "property-5"
        run_dump_test "property-6"
        run_dump_test "property-10"
+       run_dump_test "property-11"
+       run_dump_test "property-12"
+       run_dump_test "property-13"
 
        if {[istarget "*-*-linux*"]} then {
            run_dump_test "align-branch-3"
@@ -1254,6 +1257,10 @@ if [gas_64_check] then {
        run_dump_test "x86-64-property-8"
        run_dump_test "x86-64-property-9"
        run_dump_test "x86-64-property-10"
+       run_dump_test "x86-64-property-11"
+       run_dump_test "x86-64-property-12"
+       run_dump_test "x86-64-property-13"
+       run_dump_test "x86-64-property-14"
 
        if {[istarget "*-*-linux*"]} then {
            run_dump_test "x86-64-align-branch-3"
index cb9dbf863de6308b07e0493609f5ec76bce2c254..d40bd5259e0a6e7eb34a790b46d6685ea291f91a 100644 (file)
@@ -5,4 +5,4 @@
 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: <None>
+      Properties: x86 ISA used: x86-64-baseline
index 4c2938044790e41d1939c796711b736b4fa861bb..729784ad7a8223faa6bbc62fb30fbf8a777075d9 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0
index ad87ca7a1b9752358714307999ffeacb2b64cbe2..69c8cbb2e055e758ea2ce908bbc7cc542a862039 100644 (file)
@@ -5,5 +5,5 @@
 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: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86, XMM
diff --git a/gas/testsuite/gas/i386/property-11.d b/gas/testsuite/gas/i386/property-11.d
new file mode 100644 (file)
index 0000000..b3a4591
--- /dev/null
@@ -0,0 +1,9 @@
+#name: i386 property 11
+#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-v3
+       x86 feature used: x86, XMM
diff --git a/gas/testsuite/gas/i386/property-11.s b/gas/testsuite/gas/i386/property-11.s
new file mode 100644 (file)
index 0000000..0bfc4d8
--- /dev/null
@@ -0,0 +1,2 @@
+       .text
+       vaesenclast %xmm4,%xmm6,%xmm2
diff --git a/gas/testsuite/gas/i386/property-12.d b/gas/testsuite/gas/i386/property-12.d
new file mode 100644 (file)
index 0000000..fb9fa5c
--- /dev/null
@@ -0,0 +1,9 @@
+#name: i386 property 12
+#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-v4
+       x86 feature used: x86, XMM, MASK
diff --git a/gas/testsuite/gas/i386/property-12.s b/gas/testsuite/gas/i386/property-12.s
new file mode 100644 (file)
index 0000000..f2a198b
--- /dev/null
@@ -0,0 +1,2 @@
+       .text
+       vpdpwssd %xmm2, %xmm4, %xmm2{%k3}
diff --git a/gas/testsuite/gas/i386/property-13.d b/gas/testsuite/gas/i386/property-13.d
new file mode 100644 (file)
index 0000000..91d1ce6
--- /dev/null
@@ -0,0 +1,9 @@
+#name: i386 property 13
+#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, YMM, ZMM, MASK
diff --git a/gas/testsuite/gas/i386/property-13.s b/gas/testsuite/gas/i386/property-13.s
new file mode 100644 (file)
index 0000000..20e8fdf
--- /dev/null
@@ -0,0 +1,2 @@
+       .text
+       vscatterpf1dps  123(%ebp,%zmm7,8){%k1}
index bdb469b56d9ef4014eae953c8b3e93bf85d72954..5e322caf28164a60afb088f2a9ae530d7aac7c8a 100644 (file)
@@ -5,5 +5,5 @@
 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, AVX512_BF16
-       x86 feature used: x86, x87, MMX, XMM, YMM, ZMM, FXSR, XSAVE, XSAVEOPT, XSAVEC
+      Properties: x86 ISA used: x86-64-baseline
+       x86 feature used: x86
index 15281872bc9d20451d24304bb8c7a9bbc3dfe2b2..5aaefe77e7f0db7c7d6b5e474f47acb80d1faa57 100644 (file)
@@ -1,32 +1,2 @@
        .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
-       vcvtne2ps2bf16  (%ecx), %zmm0, %zmm1
index 36d215584e5fe3ce3211e1e609cfc83d2eec16a6..b6aba35806cc94526868d15cf63abf5a382e9553 100644 (file)
@@ -5,5 +5,5 @@
 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: SSE
-       x86 feature used: x86, MMX, XMM
+      Properties: x86 ISA used: x86-64-v2
+       x86 feature used: x86, XMM
index c42bdcbcdc41ad7e4b002b533df35b7c863b8f5f..4fd398bb4743ff11c4c34f421775f993c5450d3c 100644 (file)
@@ -1,2 +1,2 @@
        .text
-       cvtpi2ps (%eax), %xmm0
+       addsubpd (%eax), %xmm0
index 0fe6bc7db4e10e186e514b42915fc861d418f017..c23625cd67faa7dceed2063459af771565db56ba 100644 (file)
@@ -5,5 +5,5 @@
 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: AVX
-       x86 feature used: x86, XMM, YMM
+      Properties: x86 ISA used: x86-64-v3
+       x86 feature used: x86, XMM
index 16e71d658c4f4470885e3fde610f56fb65c70632..ba7679d84ba1636de220ff913a39a86f77ff9d50 100644 (file)
@@ -5,5 +5,5 @@
 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: AVX512F
-       x86 feature used: x86, XMM, YMM, ZMM
+      Properties: x86 ISA used: x86-64-v4
+       x86 feature used: x86, XMM
index cf175c535763ef1747063155e80c025d0e37eb6d..d1a4ed6caaa24a20fe2dba1d386c78e5e1064791 100644 (file)
@@ -5,5 +5,5 @@
 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: AVX512F
-       x86 feature used: x86, XMM, YMM, ZMM
+      Properties: x86 ISA used: x86-64-v4
+       x86 feature used: x86, MASK
index cfcb795855d1a86028cc7ee49df2596b3d472ba3..931c7d264779ae08659e374567fa1817cab05b3c 100644 (file)
@@ -6,4 +6,4 @@
 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: <None>
+      Properties: x86 ISA used: x86-64-baseline
index c401ca2faad1e539e34195c6d0e1ea4f0ad2613b..1e7748f3083184da178ec76dfea080ba67a8676d 100644 (file)
@@ -6,5 +6,5 @@
 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: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86, XMM
diff --git a/gas/testsuite/gas/i386/x86-64-property-11.d b/gas/testsuite/gas/i386/x86-64-property-11.d
new file mode 100644 (file)
index 0000000..d240229
--- /dev/null
@@ -0,0 +1,10 @@
+#name: x86-64 property 11
+#source: property-11.s
+#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-v3
+       x86 feature used: x86, XMM
diff --git a/gas/testsuite/gas/i386/x86-64-property-12.d b/gas/testsuite/gas/i386/x86-64-property-12.d
new file mode 100644 (file)
index 0000000..ff12b65
--- /dev/null
@@ -0,0 +1,10 @@
+#name: x86-64 property 12
+#source: property-12.s
+#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-v4
+       x86 feature used: x86, XMM, MASK
diff --git a/gas/testsuite/gas/i386/x86-64-property-13.d b/gas/testsuite/gas/i386/x86-64-property-13.d
new file mode 100644 (file)
index 0000000..5ed609a
--- /dev/null
@@ -0,0 +1,10 @@
+#name: x86-64 property 13
+#source: property-13.s
+#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, YMM, ZMM, MASK
diff --git a/gas/testsuite/gas/i386/x86-64-property-14.d b/gas/testsuite/gas/i386/x86-64-property-14.d
new file mode 100644 (file)
index 0000000..41503c3
--- /dev/null
@@ -0,0 +1,9 @@
+#name: x86-64 property 13
+#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-v2
+       x86 feature used: x86
diff --git a/gas/testsuite/gas/i386/x86-64-property-14.s b/gas/testsuite/gas/i386/x86-64-property-14.s
new file mode 100644 (file)
index 0000000..1b81dae
--- /dev/null
@@ -0,0 +1,2 @@
+       .text
+       sahf
index bde7e55b30db934f12fb33aaf275a71304f3da5b..d54dff96e10265ee03148f6f57eb563255ecb0ad 100644 (file)
@@ -6,5 +6,5 @@
 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, AVX512_BF16
-       x86 feature used: x86, x87, MMX, XMM, YMM, ZMM, FXSR, XSAVE, XSAVEOPT, XSAVEC
+      Properties: x86 ISA used: x86-64-baseline
+       x86 feature used: x86
index aa116e0fbc57c4a2fce9f1b03f6182b594474323..bc1e48303a3417fe0cca6fb4dcf0a9a8d6376601 100644 (file)
@@ -6,5 +6,5 @@
 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: SSE
-       x86 feature used: x86, MMX, XMM
+      Properties: x86 ISA used: x86-64-v2
+       x86 feature used: x86, XMM
index 4a489509d6594da7599dec63402ea521991630de..fd4bee055bb300c53a80e60c84a7f61fd631a5d4 100644 (file)
@@ -6,5 +6,5 @@
 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: AVX
-       x86 feature used: x86, XMM, YMM
+      Properties: x86 ISA used: x86-64-v3
+       x86 feature used: x86, XMM
index 590d8d585f4b45f996d73a1dbfe98f493376e6cd..73e24b918fcfeec88fddd7e2c8b58b3b0febdf1e 100644 (file)
@@ -6,5 +6,5 @@
 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: AVX512F
-       x86 feature used: x86, XMM, YMM, ZMM
+      Properties: x86 ISA used: x86-64-v4
+       x86 feature used: x86, XMM
index 862d4c3536059b961ad0c214dee75ddbd359da2a..330e6f646ba6098978d83d6c7f1b9d8ac8462264 100644 (file)
@@ -6,5 +6,5 @@
 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: AVX512F
-       x86 feature used: x86, XMM, YMM, ZMM
+      Properties: x86 ISA used: x86-64-v4
+       x86 feature used: x86, MASK
index e938cc90da99b9fbd7e04461cf84654b0db1bf03..6fe6a366660643c3e3c5fac11953b1926a5b017e 100644 (file)
@@ -1,9 +1,9 @@
-#name: x86-64 property 4
+#name: x86-64 property 7
 #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: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86, TMM
index e938cc90da99b9fbd7e04461cf84654b0db1bf03..4b5908aeab244695a964788c079c1cefe1e126dc 100644 (file)
@@ -1,9 +1,9 @@
-#name: x86-64 property 4
+#name: x86-64 property 8
 #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: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86, TMM
index e938cc90da99b9fbd7e04461cf84654b0db1bf03..2472c6ea65338a29c53a86579d30610dc7813f69 100644 (file)
@@ -1,9 +1,9 @@
-#name: x86-64 property 4
+#name: x86-64 property 9
 #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: <None>
+      Properties: x86 ISA used: x86-64-baseline
        x86 feature used: x86, TMM
index 12fd17b7eae535440cd3ac26c87402f25a2b056f..8fdf30f4a90de2596479be403888ace315d57612 100644 (file)
@@ -1,3 +1,19 @@
+2020-10-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/26703
+       * elf/common.h (GNU_PROPERTY_X86_ISA_1_USED): Renamed to ...
+       (GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED): This.
+       (GNU_PROPERTY_X86_ISA_1_NEEDED): Renamed to ...
+       (GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): This.
+       (GNU_PROPERTY_X86_ISA_1_XXX): Renamed to ...
+       (GNU_PROPERTY_X86_COMPAT_2_ISA_1_XXX): This.
+       (GNU_PROPERTY_X86_ISA_1_NEEDED): New.
+       (GNU_PROPERTY_X86_ISA_1_USED): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_V2): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_V3): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_V4): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_MASK): Likewise.
+
 2020-09-23  Mark Wielaard  <mark@klomp.org>
 
        Sync with GCC
index 571e21af29a3df23671d76cadbe1f362231cd804..b3c30e0e2f726a1702dd0773033cb6ae40ae3f05 100644 (file)
   (GNU_PROPERTY_X86_UINT32_AND_LO + 0)
 
 #define GNU_PROPERTY_X86_ISA_1_NEEDED \
-  (GNU_PROPERTY_X86_UINT32_OR_LO + 0)
+  (GNU_PROPERTY_X86_UINT32_OR_LO + 2)
 #define GNU_PROPERTY_X86_FEATURE_2_NEEDED \
   (GNU_PROPERTY_X86_UINT32_OR_LO + 1)
 
 #define GNU_PROPERTY_X86_ISA_1_USED \
-  (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 0)
+  (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 2)
 #define GNU_PROPERTY_X86_FEATURE_2_USED \
   (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1)
 
+/* Baseline: CMOV (cmov) CX8 (cmpxchg8b) FPU (fld), FXSR (fxsave),
+   SCE (syscall), MMX, SSE and SSE2.  */
+
+/* GNU_PROPERTY_X86_ISA_1_V2: Baseline, CMPXCHG16B (cmpxchg16b),
+   LAHF-SAHF (lahf), POPCNT (popcnt), SSE3, SSSE3, SSE4.1 and SSE4.2.  */
+#define GNU_PROPERTY_X86_ISA_1_V2              (1U << 0)
+/* GNU_PROPERTY_X86_ISA_1_V3: GNU_PROPERTY_X86_ISA_1_V2, AVX, AVX2, BMI1,
+   BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE.  */
+#define GNU_PROPERTY_X86_ISA_1_V3              (1U << 1)
+/* GNU_PROPERTY_X86_ISA_1_V4: GNU_PROPERTY_X86_ISA_1_V3, AVX512F,
+   AVX512BW, AVX512CD, AVX512DQ and AVX512VL.  */
+#define GNU_PROPERTY_X86_ISA_1_V4              (1U << 2)
+
 #define GNU_PROPERTY_X86_FEATURE_1_IBT         (1U << 0)
 #define GNU_PROPERTY_X86_FEATURE_1_SHSTK       (1U << 1)
 
-#define GNU_PROPERTY_X86_ISA_1_CMOV            (1U << 0)
-#define GNU_PROPERTY_X86_ISA_1_SSE             (1U << 1)
-#define GNU_PROPERTY_X86_ISA_1_SSE2            (1U << 2)
-#define GNU_PROPERTY_X86_ISA_1_SSE3            (1U << 3)
-#define GNU_PROPERTY_X86_ISA_1_SSSE3           (1U << 4)
-#define GNU_PROPERTY_X86_ISA_1_SSE4_1          (1U << 5)
-#define GNU_PROPERTY_X86_ISA_1_SSE4_2          (1U << 6)
-#define GNU_PROPERTY_X86_ISA_1_AVX             (1U << 7)
-#define GNU_PROPERTY_X86_ISA_1_AVX2            (1U << 8)
-#define GNU_PROPERTY_X86_ISA_1_FMA             (1U << 9)
-#define GNU_PROPERTY_X86_ISA_1_AVX512F         (1U << 10)
-#define GNU_PROPERTY_X86_ISA_1_AVX512CD                (1U << 11)
-#define GNU_PROPERTY_X86_ISA_1_AVX512ER                (1U << 12)
-#define GNU_PROPERTY_X86_ISA_1_AVX512PF                (1U << 13)
-#define GNU_PROPERTY_X86_ISA_1_AVX512VL                (1U << 14)
-#define GNU_PROPERTY_X86_ISA_1_AVX512DQ                (1U << 15)
-#define GNU_PROPERTY_X86_ISA_1_AVX512BW                (1U << 16)
-#define GNU_PROPERTY_X86_ISA_1_AVX512_4FMAPS   (1U << 17)
-#define GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW   (1U << 18)
-#define GNU_PROPERTY_X86_ISA_1_AVX512_BITALG   (1U << 19)
-#define GNU_PROPERTY_X86_ISA_1_AVX512_IFMA     (1U << 20)
-#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI     (1U << 21)
-#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2    (1U << 22)
-#define GNU_PROPERTY_X86_ISA_1_AVX512_VNNI     (1U << 23)
-#define GNU_PROPERTY_X86_ISA_1_AVX512_BF16     (1U << 24)
-
 #define GNU_PROPERTY_X86_FEATURE_2_X86         (1U << 0)
 #define GNU_PROPERTY_X86_FEATURE_2_X87         (1U << 1)
 #define GNU_PROPERTY_X86_FEATURE_2_MMX         (1U << 2)
 #define GNU_PROPERTY_X86_FEATURE_2_XSAVEOPT    (1U << 8)
 #define GNU_PROPERTY_X86_FEATURE_2_XSAVEC      (1U << 9)
 #define GNU_PROPERTY_X86_FEATURE_2_TMM         (1U << 10)
+#define GNU_PROPERTY_X86_FEATURE_2_MASK                (1U << 11)
+
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED \
+  (GNU_PROPERTY_X86_UINT32_OR_LO + 0)
+
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED \
+  (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 0)
+
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_CMOV           (1U << 0)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE            (1U << 1)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE2           (1U << 2)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE3           (1U << 3)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSSE3          (1U << 4)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE4_1         (1U << 5)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_SSE4_2         (1U << 6)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX            (1U << 7)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX2           (1U << 8)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_FMA            (1U << 9)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512F                (1U << 10)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512CD       (1U << 11)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512ER       (1U << 12)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512PF       (1U << 13)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512VL       (1U << 14)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512DQ       (1U << 15)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512BW       (1U << 16)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_4FMAPS  (1U << 17)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_4VNNIW  (1U << 18)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_BITALG  (1U << 19)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_IFMA    (1U << 20)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_VBMI    (1U << 21)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_VBMI2   (1U << 22)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_VNNI    (1U << 23)
+#define GNU_PROPERTY_X86_COMPAT_2_ISA_1_AVX512_BF16    (1U << 24)
 
 /* AArch64 specific GNU PROPERTY.  */
 #define GNU_PROPERTY_AARCH64_FEATURE_1_AND     0xc0000000
index 738014eb9b6a6fac7de4c6d157ea163657dd0ed2..205f6acb87c77f3e7c790de63950d8ab9d70bf6f 100644 (file)
@@ -1,3 +1,155 @@
+2020-10-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/26703
+       * NEWS: Mention -z x86-64-v[234].
+       * ld.texi: Document -z x86-64-v[234].
+       * emulparams/elf32_x86_64.sh: Use x86-64-level.sh.
+       * emulparams/elf_i386.sh: Likewise.
+       * emulparams/elf_x86_64.sh: Likewise.
+       * emulparams/x86-64-level.sh: New file.
+       * testsuite/ld-elf/x86-feature-1a.rd: Update.
+       * testsuite/ld-elf/x86-feature-1b.rd: Likewise.
+       * testsuite/ld-elf/x86-feature-1c.rd: Likewise.
+       * testsuite/ld-elf/x86-feature-1d.rd: Likewise.
+       * testsuite/ld-elf/x86-feature-1e.rd: Likewise.
+       * testsuite/ld-i386/pr23372c.d: Likewise.
+       * testsuite/ld-i386/pr23486c.d: Likewise.
+       * testsuite/ld-i386/pr23486d.d: Likewise.
+       * testsuite/ld-i386/pr24322a.d: Likewise.
+       * testsuite/ld-i386/pr24322b.d: Likewise.
+       * testsuite/ld-i386/property-1a.r: Likewise.
+       * testsuite/ld-i386/property-2a.r: Likewise.
+       * testsuite/ld-i386/property-3.r: Likewise.
+       * testsuite/ld-i386/property-3a.r: Likewise.
+       * testsuite/ld-i386/property-4.r: Likewise.
+       * testsuite/ld-i386/property-4a.r: Likewise.
+       * testsuite/ld-i386/property-5.r: Likewise.
+       * testsuite/ld-i386/property-5a.r: Likewise.
+       * testsuite/ld-i386/property-7a.r: Likewise.
+       * testsuite/ld-i386/property-x86-3.d: Likewise.
+       * testsuite/ld-i386/property-x86-4a.d: Likewise.
+       * testsuite/ld-i386/property-x86-5.d: Likewise.
+       * testsuite/ld-i386/property-x86-cet1.d: Likewise.
+       * testsuite/ld-i386/property-x86-cet2a.d: Likewise.
+       * testsuite/ld-i386/property-x86-cet5a.d: Likewise.
+       * testsuite/ld-i386/property-x86-cet5b.d: Likewise.
+       * testsuite/ld-i386/property-x86-ibt1a.d: Likewise.
+       * testsuite/ld-i386/property-x86-ibt1b.d: Likewise.
+       * testsuite/ld-i386/property-x86-ibt2.d: Likewise.
+       * testsuite/ld-i386/property-x86-ibt3a.d: Likewise.
+       * testsuite/ld-i386/property-x86-ibt3b.d: Likewise.
+       * testsuite/ld-i386/property-x86-ibt4.d: Likewise.
+       * testsuite/ld-i386/property-x86-ibt5.d: Likewise.
+       * testsuite/ld-i386/property-x86-shstk1a.d: Likewise.
+       * testsuite/ld-i386/property-x86-shstk1b.d: Likewise.
+       * testsuite/ld-i386/property-x86-shstk2.d: Likewise.
+       * testsuite/ld-i386/property-x86-shstk3a.d: Likewise.
+       * testsuite/ld-i386/property-x86-shstk3b.d: Likewise.
+       * testsuite/ld-i386/property-x86-shstk4.d: Likewise.
+       * testsuite/ld-i386/property-x86-shstk5.d: Likewise.
+       * testsuite/ld-x86-64/pr23372c-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr23372c.d: Likewise.
+       * testsuite/ld-x86-64/pr23486c.d: Likewise.
+       * testsuite/ld-x86-64/pr23486d-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr23486d.d: Likewise.
+       * testsuite/ld-x86-64/pr24322a-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr24322a.d: Likewise.
+       * testsuite/ld-x86-64/pr24322b-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr24322b.d: Likewise.
+       * testsuite/ld-x86-64/pr24458a-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr24458a.d: Likewise.
+       * testsuite/ld-x86-64/pr24458b-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr24458b.d: Likewise.
+       * testsuite/ld-x86-64/pr24458c-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr24458c.d: Likewise.
+       * testsuite/ld-x86-64/property-1a.r: Likewise.
+       * testsuite/ld-x86-64/property-2a.r: Likewise.
+       * testsuite/ld-x86-64/property-3.r: Likewise.
+       * testsuite/ld-x86-64/property-3a.r: Likewise.
+       * testsuite/ld-x86-64/property-4.r: Likewise.
+       * testsuite/ld-x86-64/property-4a.r: Likewise.
+       * testsuite/ld-x86-64/property-5.r: Likewise.
+       * testsuite/ld-x86-64/property-5a.r: Likewise.
+       * testsuite/ld-x86-64/property-7a.r: Likewise.
+       * testsuite/ld-x86-64/property-x86-3-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-3.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-4a.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-5-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-5.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-cet1-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-cet1.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-cet2a-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-cet2a.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-cet5a-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-cet5a.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-cet5b-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-cet5b.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt1a-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt1a.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt1b-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt1b.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt2-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt2.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt4-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt4.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt5-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-ibt5.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk1a-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk1a.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk1b-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk1b.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk2-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk2.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk4-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk4.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk5-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-shstk5.d: Likewise.
+       * testsuite/ld-i386/i386.exp: Run property-x86-6,
+       property-x86-isa1, property-x86-isa2 and property-x86-isa3.
+       * testsuite/ld-i386/property-x86-1.S: Updated to the current
+       GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
+       values.
+       * testsuite/ld-i386/property-x86-2.S: Likewise.
+       * testsuite/ld-i386/property-x86-3.s: Likewise.
+       * testsuite/ld-x86-64/pr23372d.s: Likewise.
+       * testsuite/ld-x86-64/pr23372e.s: Likewise.
+       * testsuite/ld-x86-64/pr23372f.s: Likewise.
+       * testsuite/ld-x86-64/pr23486c.s: Likewise.
+       * testsuite/ld-x86-64/pr23486d.s: Likewise.
+       * testsuite/ld-x86-64/property-x86-1.S: Likewise.
+       * testsuite/ld-x86-64/property-x86-2.S: Likewise.
+       * testsuite/ld-x86-64/property-x86-3.s: Likewise.
+       * testsuite/ld-x86-64/property-x86-5a.s: Likewise.
+       * testsuite/ld-x86-64/property-x86-5b.s: Likewise.
+       * testsuite/ld-i386/property-x86-6.d: New file.
+       * testsuite/ld-i386/property-x86-isa1.d: Likewise.
+       * testsuite/ld-i386/property-x86-isa2.d: Likewise.
+       * testsuite/ld-i386/property-x86-isa3.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-6-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-6.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-6.s: Likewise.
+       * testsuite/ld-x86-64/property-x86-isa1-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-isa1.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-isa1.s: Likewise.
+       * testsuite/ld-x86-64/property-x86-isa2-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-isa2.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-isa3-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-isa3.d: Likewise.
+       * testsuite/ld-x86-64/simple.s: Likewise.
+       * ld/testsuite/ld-x86-64/x86-64.exp: Run property-x86-6,
+       property-x86-6-x32, property-x86-isa1, property-x86-isa1-x32,
+       property-x86-isa2, property-x86-isa2-x32, property-x86-isa3-x32
+       and property-x86-isa3.
+
 2020-10-06  H.J. Lu  <hongjiu.lu@intel.com>
 
        * testsuite/ld-i386/property-3.r: Updated for Fedora binary
diff --git a/ld/NEWS b/ld/NEWS
index e4ae43b257d2297462c527a2b2328d70fa8ce8c5..2f20a5fbcd0242212841afc0ccfc2493772557b2 100644 (file)
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -1,5 +1,8 @@
 -*- text -*-
 
+* Add -z x86-64-v[234] to the x86 ELF linker to mark x86-64-v[234] ISA
+  level as needed.
+
 * Add -z unique-symbol to avoid duplicated local symbol names.
 
 * The creation of PE format DLLs now defaults to using a more secure set of DLL
index 1f672c6e42644373ec70030ad1623648cc12d8af..0d7c7145a60bfbd9fafe1987f95f701f55d359bb 100644 (file)
@@ -4,6 +4,7 @@ source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
 source_sh ${srcdir}/emulparams/reloc_overflow.sh
 source_sh ${srcdir}/emulparams/call_nop.sh
 source_sh ${srcdir}/emulparams/cet.sh
+source_sh ${srcdir}/emulparams/x86-64-level.sh
 source_sh ${srcdir}/emulparams/static.sh
 SCRIPT_NAME=elf
 ELFSIZE=32
index c98d5e6600e678e62ce08530132e20e98e69c757..741633fa07af06ae52cf3060c130b97594784a32 100644 (file)
@@ -3,6 +3,7 @@ source_sh ${srcdir}/emulparams/extern_protected_data.sh
 source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
 source_sh ${srcdir}/emulparams/call_nop.sh
 source_sh ${srcdir}/emulparams/cet.sh
+source_sh ${srcdir}/emulparams/x86-64-level.sh
 source_sh ${srcdir}/emulparams/static.sh
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
index be98082982f58076d98d4cef31390e3b310d7231..5996055e9ff9f188d505bf208bd45cac0f6cf2c5 100644 (file)
@@ -4,6 +4,7 @@ source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
 source_sh ${srcdir}/emulparams/reloc_overflow.sh
 source_sh ${srcdir}/emulparams/call_nop.sh
 source_sh ${srcdir}/emulparams/cet.sh
+source_sh ${srcdir}/emulparams/x86-64-level.sh
 source_sh ${srcdir}/emulparams/static.sh
 SCRIPT_NAME=elf
 ELFSIZE=64
diff --git a/ld/emulparams/x86-64-level.sh b/ld/emulparams/x86-64-level.sh
new file mode 100644 (file)
index 0000000..efa75ca
--- /dev/null
@@ -0,0 +1,18 @@
+PARSE_AND_LIST_OPTIONS_X86_64_LEVEL='
+  fprintf (file, _("\
+  -z x86-64-v[234]            Mark x86-64-v[234] ISA level as needed\n"));
+'
+PARSE_AND_LIST_ARGS_CASE_Z_X86_64_LEVEL='
+      else if (strncmp (optarg, "x86-64-v", 8) == 0)
+       {
+         char *end;
+         unsigned int level = strtoul (optarg + 8 , &end, 10);
+         if (*end != '\0' || level < 2 || level > 4)
+           einfo (_("%F%P: invalid x86-64 ISA level: %s\n"),
+                  optarg);
+           params.isa_level = level;
+       }
+'
+
+PARSE_AND_LIST_OPTIONS="$PARSE_AND_LIST_OPTIONS $PARSE_AND_LIST_OPTIONS_X86_64_LEVEL"
+PARSE_AND_LIST_ARGS_CASE_Z="$PARSE_AND_LIST_ARGS_CASE_Z $PARSE_AND_LIST_ARGS_CASE_Z_X86_64_LEVEL"
index ee592df6c244da5a331d0a8d9307e37e01bebca3..66bede283e8adf039081e41c786f839de7fe13a2 100644 (file)
@@ -1419,6 +1419,15 @@ Do not report unresolved symbol references from regular object files,
 either when creating an executable, or when creating a shared library.
 This option is the inverse of @samp{-z defs}.
 
+@item x86-64-v2
+@item x86-64-v3
+@itemx x86-64-v4
+Specify the x86-64 ISA level needed in .note.gnu.property section.
+@option{x86-64-v2} generates @code{GNU_PROPERTY_X86_ISA_1_V2}.
+@option{x86-64-v3} generates @code{GNU_PROPERTY_X86_ISA_1_V3}.
+@option{x86-64-v4} generates @code{GNU_PROPERTY_X86_ISA_1_V4}.
+Supported for Linux/i386 and Linux/x86_64.
+
 @end table
 
 Other keywords are ignored for Solaris compatibility.
index db7718a388c8dffab6789b8547b23c6b2e9406c9..fda3063b78ce5b7f1e79dad844b00d278bcb07cc 100644 (file)
@@ -2,5 +2,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 81a8d8d49ad07f39ee03440f79be72e9c6776599..b0d6f64562f0b2a47a4bd947c2f5dac089d55965 100644 (file)
@@ -2,5 +2,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 81a8d8d49ad07f39ee03440f79be72e9c6776599..b0d6f64562f0b2a47a4bd947c2f5dac089d55965 100644 (file)
@@ -2,5 +2,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 3dea01266e5485f559b2a00ce9ffed04461e2236..d5c3debd01987fc343252d7bfbe370576e00cc06 100644 (file)
@@ -2,5 +2,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: <None>
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 8ad7d43de61823d8ec83a7a0026edb09fc03c8ed..eb82ef2d6cf0f03fc4d3a81924e8c45f19dcf55f 100644 (file)
@@ -2,5 +2,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT, SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index cd7b4deebdeee232ff235227e8a1e212a65759c5..0b1538ed81d66483d74228abb8e1e33ee4bd4ac4 100644 (file)
@@ -422,6 +422,7 @@ run_dump_test "property-x86-3"
 run_dump_test "property-x86-4a"
 run_dump_test "property-x86-4b"
 run_dump_test "property-x86-5"
+run_dump_test "property-x86-6"
 run_dump_test "property-x86-ibt1a"
 run_dump_test "property-x86-ibt1b"
 run_dump_test "property-x86-ibt2"
@@ -475,6 +476,9 @@ run_dump_test "pr26263"
 run_dump_test "pr26711-1"
 run_dump_test "pr26711-2"
 run_dump_test "pr26711-3"
+run_dump_test "property-x86-isa1"
+run_dump_test "property-x86-isa2"
+run_dump_test "property-x86-isa3"
 
 if { !([istarget "i?86-*-linux*"]
        || [istarget "i?86-*-gnu*"]
index 59fdc239232799657dd0ed3cc342a88174ffab91..fffd680f069847b1abb26440d1e369c03ece37e8 100644 (file)
@@ -7,4 +7,4 @@
 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: <None>
+      Properties: x86 ISA used: x86-64-baseline
index 30d22596ae00b22e3d0143cc17922b4de7ce5f24..92765f5ddcf546106331dd1e7b8307e09ed40061 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3
index 025b8e0541d5a3b622187560f07601d0e5566a7e..c673e8e0d7446d9cf7d4662c61b4ca3a52d6cea8 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3
index a77a85c858d22e9dedc9e9590cffae38f5f7aa6f..a273e687f92505ef830725cb8f0747b2361d7062 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 62e8246c398f25fce9d47731fed3141f08041abf..244d8c3df453a2a6f6edf3aa5ee1edbee82f3f77 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 85615f1bd243f335ef9f3abaed8e1184f2c7ccde..cbdd6477a451643824c0e47698352cc9719da486 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: no copy on protected 
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
 
 #pass
index a85ef0e369675367c5a6698d1dba58a27816f026..51bfde816333c0342023d7d581d61e5f92b0bec4 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
 
 #pass
index e95d47ae8d69d0bc03fd10bc0b4a1f0eb629c4d8..3578823f93ef2ff462b176f26a446df7d4197c0a 100644 (file)
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
 #...
-       x86 ISA needed: CMOV, SSE
+       x86 ISA needed: x86-64-v2, x86-64-v3
 #pass
index 2201c9860ec0c5c5222766904b2c47769308d62c..89cc8fa76bc29f7c45108c6a72074ca5786f1216 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA needed: CMOV, SSE
-       x86 ISA used: SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>
 #pass
index a4b7bb71adf5e8ea34faa3b4b276da879889ff63..a024b2a60adc7ee08a8196947866ecb856cc4a80 100644 (file)
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
 #...
-       x86 ISA needed: CMOV, SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 8>
 #pass
index 8448cc70acfe350315e53a3e5e38dc31f5475be9..ff61875ce3e1b0e32da8c5e05ac4865fbdd86a0b 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA needed: CMOV, SSE, SSE3
-       x86 ISA used: CMOV, SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 8>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 8>
 #pass
index 5ff95648c29c91948c9f002a384252851d2f2f40..eb24e3ad270d11cf82864ca16fdfd60bc23829a0 100644 (file)
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x900000
 #...
-       x86 ISA needed: CMOV, SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 8>
 #pass
index 9388a07b7b27dba591bb57cd6f0ac5e954dc89ac..c99af9e9413afcd510ad763971ca6bdc0291109c 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x900000
-       x86 ISA needed: CMOV, SSE, SSE3
-       x86 ISA used: CMOV, SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 8>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 8>
 #pass
index 1cce5d94742902c1124d839a3a944fe7373c3981..c97fc72524e05d2b5bcc167c454230094a35ad92 100644 (file)
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
        no copy on protected 
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index f0b8fc0ce5eb068fd45a2aaa7ac6823cd00bb6a6..cb0a2cf1117a8e4665806084a74c96c9d43ac5da 100644 (file)
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
index 39876811cbe17c4c45e999e9a40a1475e0f0f8ad..01c755f59d693893f18b551544c5dc55ef67e765 100644 (file)
@@ -9,14 +9,14 @@
 1:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
index 8b3ddb53db5b2a627599248e365e2ba89f6dd1cb..059388dfca0d3e4c5c0aabaf778149b12becad99 100644 (file)
@@ -5,6 +5,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
-       x86 ISA used: CMOV, SSE, SSSE3, SSE4_1
+      Properties: x86 ISA needed: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
index 7e5924f829b5e0bcf96ec6987b8c30dbdf7562dc..f137b71bc6292c12975ec322a626f4c2fccd24ad 100644 (file)
@@ -9,14 +9,14 @@
 1:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
 1:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x30
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
index e28562aa7dd187d9eaf610a359b2811622a3931a..3006627abe9df92aa773f89a4d68793a2764055a 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
       Properties: no copy on protected 
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index dc9b67c70882bf5b5f19b3e8129ad78b224fefad..71faa63eb2ccf9e65236b13cd7ca41a5c87150cc 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV
-       x86 ISA used: <None>
+      Properties: x86 ISA needed: x86-64-v2
+       x86 ISA used: x86-64-baseline
diff --git a/ld/testsuite/ld-i386/property-x86-6.d b/ld/testsuite/ld-i386/property-x86-6.d
new file mode 100644 (file)
index 0000000..95c64b2
--- /dev/null
@@ -0,0 +1,10 @@
+#source: ../ld-x86-64/property-x86-6.s
+#as: --32 -mx86-used-note=no
+#ld: -shared -m elf_i386
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+[      ]+Owner[        ]+Data size[    ]+Description
+  GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
index f2cf7a6a727f49cbee1657862f43eccd32ef85a7..fbce0bbaecc6e59cac38e4cd47acad682ae61a6a 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT, SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 93b871ea134fa8b7df1f25c630824628ca53ffce..655762deed19e4e5ed0914239db5a9937e754fb7 100644 (file)
@@ -10,6 +10,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
-       x86 ISA used: CMOV, SSE, SSSE3, SSE4_1
+      Properties: x86 ISA needed: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
index 412f4dccceccb41cc56a1bdcece55e613eac6677..bd7e2edfaa6008ca039a98f64b380018f9406eb1 100644 (file)
@@ -6,5 +6,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 868b0030b8ad87d6e3b03012ad714a7230ef4c1b..0b47267e16b0044e71f2fc5b8d010a91c01f24f9 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT, SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 989b99c397a68f7553f8cf7ca4335d613276ee79..1fee1ae2d3052991574fb9e6b7a3e7fcd745990c 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 1aa80cb2ba1c92e85af8a5f6ae8549ffee2029a2..adb00d72ea71af54dfd5ac94833c18705fd6d1e0 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index bd47f95d486d7c151801b65fa4cf4ee723816335..68aa0feebcf5ea2c9c171d1fdccfcbbc2484ab79 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 7e6079c89226f649026628b172a8b5c7411c5bd2..290bcac1c84e91709fa5cc5b4494bd567df8a40d 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
-       x86 ISA used: CMOV, SSE, SSSE3, SSE4_1
+      Properties: x86 ISA needed: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
index 861fec961973f97932df6098ca93f162ae16004c..0ac9e7ff000180f90af900034c75c7ad06af9aba 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
-       x86 ISA used: CMOV, SSE, SSSE3, SSE4_1
+      Properties: x86 ISA needed: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
index e271cc944a04cb9be90c652bd422cb0e2e26db70..0e613e23bf18a4c46d246b1b9e757c9ba477add6 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 2245369088336a05b3ce31c5d600e0be39574127..23da096b852bea4b7f23d6d6548d8b7a2fd29afd 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
diff --git a/ld/testsuite/ld-i386/property-x86-isa1.d b/ld/testsuite/ld-i386/property-x86-isa1.d
new file mode 100644 (file)
index 0000000..22ac02b
--- /dev/null
@@ -0,0 +1,11 @@
+#source: ../ld-x86-64/property-x86-isa1.s
+#source: ../ld-x86-64/simple.s
+#as: --32 -mx86-used-note=no
+#ld: -m elf_i386 -z x86-64-v4
+#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 needed: x86-64-v2, x86-64-v4
+       <procesor-specific type 0xc0009000 data: 30 00 00 00 >
diff --git a/ld/testsuite/ld-i386/property-x86-isa2.d b/ld/testsuite/ld-i386/property-x86-isa2.d
new file mode 100644 (file)
index 0000000..1dc83a7
--- /dev/null
@@ -0,0 +1,9 @@
+#source: ../ld-x86-64/simple.s
+#as: --32 -mx86-used-note=no
+#ld: -m elf_i386 -z x86-64-v4
+#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 needed: x86-64-v4
diff --git a/ld/testsuite/ld-i386/property-x86-isa3.d b/ld/testsuite/ld-i386/property-x86-isa3.d
new file mode 100644 (file)
index 0000000..60b20d2
--- /dev/null
@@ -0,0 +1,9 @@
+#source: ../ld-x86-64/simple.s
+#as: --32 -mx86-used-note=no
+#ld: -r -m elf_i386 -z x86-64-v4
+#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 needed: x86-64-v4
index 93586d4bbc888783223fd7cefe394820d04dfbd2..ab774dc6a5202b4f6377a98948c6f2d768464db3 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 3916bacf376cde15ba7d82671ec6133d571b2211..97517c32fd41aafa80017b090ddb96b03f41e0e5 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 3c24ee57a02c82cd2702d10bad0a483348a47a70..97003022289272b3ca91dced85b7b1a489ef19cc 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 9d2ce559ea8d87491bc2d528b02fb1b2e12e7da7..1b6da4f4302935a0805b4288714a5e1025d14d40 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
-       x86 ISA used: CMOV, SSE, SSSE3, SSE4_1
+      Properties: x86 ISA needed: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
index 86f4395bccc37cdabda693f0ca94aefa04a0f661..98a156291062711ac27b612f80f3842f0c0d6ec6 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
-       x86 ISA used: CMOV, SSE, SSSE3, SSE4_1
+      Properties: x86 ISA needed: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
index 84dda933dcca28048429c3acccfd370d946a711d..fa4c88c148f1bac5c6882f43df2d88a65c1aaa71 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 613daa438301afc70d52a06473407890f9b85d8b..64a35398aab2bc521d14845137a071b8ed6f167c 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index e01a7666fc389f8226985863076d41bf995c63c3..5698ec268b51b2647e7c2f00be59565b6234568a 100644 (file)
@@ -7,4 +7,4 @@
 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: <None>
+      Properties: x86 ISA used: x86-64-baseline
index 359cc09a0b3162adda6fa13b0c1be8115ab2c4e0..e1281b2e1cd828f1937b373004945e4caf93ddc0 100644 (file)
@@ -7,4 +7,4 @@
 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: <None>
+      Properties: x86 ISA used: x86-64-baseline
index cec05cdba8cf4dda48447722a400fd3995277382..3875c94a540da586687e63645f08c8d0b786ea19 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
        .long 0x0
index cec05cdba8cf4dda48447722a400fd3995277382..3875c94a540da586687e63645f08c8d0b786ea19 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
        .long 0x0
index 57797c8561c30eff4b692abfbaa35c76515c42e3..6d79c14c13befde90dcbb95b28852b659ade1a9e 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
        .long 0x0
index 7a5e7325c2e3547fd844b18e009a8c61f80242a5..11215f3d03688d1603d25e9f38620d8a3a6c7f19 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3
index cda1f1c46194b542081e49294e3e68d589b6bc6d..38c54cad8a33d203592a99bb985051f35940d77e 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3
index 16bb94d9597856352d90b2e7730f3de63764e96a..7860eac3aef04ee8a0a88450fcc731a57118d71b 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
        .long 0xa
index 41da74c6c57d39378cd762abc025d75eda6295d3..74eb4c0969a76cef2a4822ac7d468f732cb4527a 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3
index 0ca7c505a1cddc8bf281f70b369e2070f4b30f2a..4f335238c3def1d881bf330be92cdf02601fbac3 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3
index 88f9c112c1a49c632418fdddd73e88e6e898561d..c39910596aeee230e422af851362327e98d07b27 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
        .long 0x3
index f18678d69b6fe70fc313aa9e43796bc208b247c2..8009f910974740bcd85c0dae6095f1bd95cb87b4 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index a27de4a11a5c047ff72f30a2ff3ed43c37417375..6ddb7a7163d3e62665e9897110d27f32dd9e1e22 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 4e19b8d3e4eabf2b8095b179e8688e383cf265b1..76ebd1cfa37e0e9ec16989cf06d4bdeaef172693 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index f56e21191466ad41bbb725ba63751b7ab0da76cb..6ee01464434fd2a238c3d14ba33f2474c9d50d82 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 9b8dc3076c4c8a96938e342e7f1b7fef72d35661..9909f1760d6675120b3e387ccafe673bf44f8019 100644 (file)
@@ -6,5 +6,5 @@
 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: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 8319a58829563e9187763b0a04aa29038c5328d6..d0fbc3390fb56b621ed75d9b842892817fd261d4 100644 (file)
@@ -6,5 +6,5 @@
 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: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 263c7979e7eec66f769e63620ab4e920ab9d58e3..9f80ed20d99220301543bbe1525e30b48a3c61a6 100644 (file)
@@ -6,5 +6,5 @@
 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: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 3614d67589b3e6f0c95e3a7c07d27b7cb9393ea3..ee1894894d1fe3711ef2add249c43ec23b71e462 100644 (file)
@@ -6,5 +6,5 @@
 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: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 767038ae8b97341e2a857343f6ca6c2e51e7ab8a..7107c3f9892f921605f64ca9b34b06b67dc52747 100644 (file)
@@ -6,5 +6,5 @@
 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: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index bc3758fb564ca5dfeb42a0e919856909b94c4032..690088a532fb957469ff37386270e5bd94dc7285 100644 (file)
@@ -6,5 +6,5 @@
 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: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 85615f1bd243f335ef9f3abaed8e1184f2c7ccde..cbdd6477a451643824c0e47698352cc9719da486 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: no copy on protected 
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
 
 #pass
index a85ef0e369675367c5a6698d1dba58a27816f026..51bfde816333c0342023d7d581d61e5f92b0bec4 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
 
 #pass
index e95d47ae8d69d0bc03fd10bc0b4a1f0eb629c4d8..3578823f93ef2ff462b176f26a446df7d4197c0a 100644 (file)
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
 #...
-       x86 ISA needed: CMOV, SSE
+       x86 ISA needed: x86-64-v2, x86-64-v3
 #pass
index 2201c9860ec0c5c5222766904b2c47769308d62c..89cc8fa76bc29f7c45108c6a72074ca5786f1216 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA needed: CMOV, SSE
-       x86 ISA used: SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>
 #pass
index a4b7bb71adf5e8ea34faa3b4b276da879889ff63..a024b2a60adc7ee08a8196947866ecb856cc4a80 100644 (file)
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
 #...
-       x86 ISA needed: CMOV, SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 8>
 #pass
index 8448cc70acfe350315e53a3e5e38dc31f5475be9..ff61875ce3e1b0e32da8c5e05ac4865fbdd86a0b 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA needed: CMOV, SSE, SSE3
-       x86 ISA used: CMOV, SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 8>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 8>
 #pass
index 5ff95648c29c91948c9f002a384252851d2f2f40..eb24e3ad270d11cf82864ca16fdfd60bc23829a0 100644 (file)
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x900000
 #...
-       x86 ISA needed: CMOV, SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 8>
 #pass
index 9388a07b7b27dba591bb57cd6f0ac5e954dc89ac..c99af9e9413afcd510ad763971ca6bdc0291109c 100644 (file)
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x900000
-       x86 ISA needed: CMOV, SSE, SSE3
-       x86 ISA used: CMOV, SSE, SSE3
+       x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 8>
        x86 feature used: x86
+       x86 ISA used: x86-64-v2, x86-64-v3, <unknown: 8>
 #pass
index 1cce5d94742902c1124d839a3a944fe7373c3981..c97fc72524e05d2b5bcc167c454230094a35ad92 100644 (file)
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
        no copy on protected 
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index c950b9db1932953fb2c25e92d879b66aa7a7f5e2..b669e728a51c81cd99b06db96fb9fe233537615b 100644 (file)
 5:
        .p2align ALIGN
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
 5:
        .p2align ALIGN
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
index 72056be46eb5d7e9624faf7ebeb7b4afd1057b43..b108b1704dead5fc9c988ea33902a5368be9b974 100644 (file)
 1:
        .p2align ALIGN
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
 5:
        .p2align ALIGN
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
index ef70a64aff01c4ae21eb3cc4a215e3ecee468e4d..5125a7aba1574463a55cc6621c0d94c186d25dff 100644 (file)
@@ -6,6 +6,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 1d191bead977fd8338dcd13e8f69a9f1cd569d6f..974230875c0e30abd993badb3a0aa78755cb703c 100644 (file)
@@ -5,6 +5,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 8c9d6dac847cbab5225487a6376baa55c6bd009d..cce71da4ef88a4d8d060bccc5cb36113d4ec6f18 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
@@ -28,7 +28,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
@@ -59,7 +59,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
@@ -70,7 +70,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x30
index 07c508186bdc04348c7667d756f9cbf2368bec5b..cf5046f6e0294b9b3f59628e32bd4646e7a24106 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
       Properties: no copy on protected 
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 6ae427e139f37d1189da601247adc51ff7424fdb..7c2bb782d89893e7086e35b0c10d5ab8256809c2 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000028      NT_GNU_PROPERTY_TYPE_0
       Properties: no copy on protected 
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 8e6b8e5a29416559b7a3ce3a0ac12796b2033ba6..8f62e3be32592154191837e9a6d8c1348789654d 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV
-       x86 ISA used: <None>
+      Properties: x86 ISA needed: x86-64-v2
+       x86 ISA used: x86-64-baseline
index dd1da830c13b3a3ef878c7aca8bf37ff2b7aed14..3ba1f481ca38235397287d84f2ba8cf0e7c3e032 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV
-       x86 ISA used: <None>
+      Properties: x86 ISA needed: x86-64-v2
+       x86 ISA used: x86-64-baseline
index 990c4683e62670ee758e2817f5d8bb657bd4604a..755facd6cd06f07cbde066ad3cfac95fe3515623 100644 (file)
@@ -22,7 +22,7 @@ _start:
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0008000        /* pr_type.  */
+       .long 0xc0008002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x1
@@ -38,7 +38,7 @@ _start:
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x0
index 1f90dfc9f368a3362c8500d2ef65d749d95f4478..7851481de7add507a045bdbcc25ef392d566e7de 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0010000        /* pr_type.  */
+       .long 0xc0010002        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x0
diff --git a/ld/testsuite/ld-x86-64/property-x86-6-x32.d b/ld/testsuite/ld-x86-64/property-x86-6-x32.d
new file mode 100644 (file)
index 0000000..57aa3c2
--- /dev/null
@@ -0,0 +1,10 @@
+#source: property-x86-6.s
+#as: --x32 -mx86-used-note=no
+#ld: -shared -m elf32_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+[      ]+Owner[        ]+Data size[    ]+Description
+  GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
diff --git a/ld/testsuite/ld-x86-64/property-x86-6.d b/ld/testsuite/ld-x86-64/property-x86-6.d
new file mode 100644 (file)
index 0000000..8639f9f
--- /dev/null
@@ -0,0 +1,9 @@
+#as: --64 -defsym __64_bit__=1 -mx86-used-note=no
+#ld: -shared -m elf_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+[      ]+Owner[        ]+Data size[    ]+Description
+  GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
diff --git a/ld/testsuite/ld-x86-64/property-x86-6.s b/ld/testsuite/ld-x86-64/property-x86-6.s
new file mode 100644 (file)
index 0000000..9a2f8f4
--- /dev/null
@@ -0,0 +1,83 @@
+       .section ".note.gnu.property", "a"
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       .long 1f - 0f           /* name length.  */
+       .long 3f - 1f           /* data length.  */
+       /* NT_GNU_PROPERTY_TYPE_0 */
+       .long 5                 /* note type.  */
+0:
+       .asciz "GNU"            /* vendor name.  */
+1:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       /* GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED */
+       .long 0xc0010000        /* pr_type.  */
+       .long 5f - 4f           /* pr_datasz.  */
+4:
+       .long 0xa
+5:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       /* GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED */
+       .long 0xc0008000        /* pr_type.  */
+       .long 5f - 4f           /* pr_datasz.  */
+4:
+       .long 0x3
+5:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+3:
+
+       .section ".note.gnu.property", "a"
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       .long 1f - 0f           /* name length.  */
+       .long 3f - 1f           /* data length.  */
+       /* NT_GNU_PROPERTY_TYPE_0 */
+       .long 5                 /* note type.  */
+0:
+       .asciz "GNU"            /* vendor name.  */
+1:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       /* GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED */
+       .long 0xc0010000        /* pr_type.  */
+       .long 5f - 4f           /* pr_datasz.  */
+4:
+       .long 0xa0
+5:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       /* GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED */
+       .long 0xc0008000        /* pr_type.  */
+       .long 5f - 4f           /* pr_datasz.  */
+4:
+       .long 0x30
+5:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+3:
index 3b4391a372a2dc3a12544467bbfcf2e1549d72b6..25cf016ac2e57d9268c590a4a77a02edc4c40741 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT, SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index abf76c58a649e9631a701da21c995ab1cdaeb9af..3e797299e87c72ae4cff98f6f653132554d920c9 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT, SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 55996c9f847af453e5c4e6df9d7e7a0df2c21ed4..2f1facb52ffc534d97b81fbfe3d6522b5b70c78c 100644 (file)
@@ -10,6 +10,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 2d7ad8cebd4b17cf3b6550e3a0938abc8772b598..9e3560c259e2d82591fab9f83cf5438244d04371 100644 (file)
@@ -10,6 +10,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 6520e56e9ea05b09c9043f236c293d62d3e028d4..928cc137a086cd04e370d3545037e2268a51321d 100644 (file)
@@ -6,5 +6,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 6a05136c4ee739b78e58481afb66d8e6375dbb9f..e36db3734a7dd409611d506e2c1558b1d43d00fd 100644 (file)
@@ -6,5 +6,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index da3c8543a07d6acbd9066411ea26a8ba9345f941..890d07021c2f0bfe2e4add363334dea8b599445a 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT, SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 1c5681d0807e4fbea5cfc86be157e7924474bc65..4f81698d94ae289737c9b33922885853432591f0 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT, SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 4ce851a28b5f6d78a9ba618b5ffb9f383b69a3a4..ba0de1b42c55648e386b64dc0ff7ab015df29f22 100644 (file)
@@ -8,5 +8,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 5f9836fbf0631ca784d071906a5dcb990c9de51c..c5caf30947934b35f2a01c5a7b0f1394ff475b96 100644 (file)
@@ -8,5 +8,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 2e6c45e9dcbe78a699c5fa40b9c9fa166ea80a82..a8918944bb19042062b900517efd41ff6baa92af 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 18020c66552b66a0f994e7591209597a309e372a..5120c01881dfee343d137fb9b938e1edd16cf986 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index eca79569b3d153581a6a87f621015c89402fbc99..3946aec3a3770c145c212a55b60ff71da20048d0 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index ddf9cc310b66749d034077f3f63a3f2d53e53266..2a55017ab2a0c39a08f7e6f2457e088b5530e4c7 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 2d9cd35d73125f15f604e6c7fdb7fdc0342cdba5..ea4254e728eb0e0da1e421621d106d672ea744b2 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index fc32d7017bcb3f13bdace56db7270b7b61194b9f..f74b2d1e9c2cdc0f25de19b6f23a376fc650543d 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index a17c121bb807726746f9ca27ea72d279e8722aa3..a2ad6f8fe7d1255f6eaa2c8e14d7c470b371f4a2 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 2425c3196805538234a9b1fb283b4edba6c0fad5..ab6bfb6281f7b7c4c87cebf085260827cc0fd734 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index f6f67dbb64cbba8c9cffb6607a8a8c76e5b0f0bc..95155c51d1f4d19c3637d7ade10481976b9e8262 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index ab0217567b5dff482fbf4e2edef580db180cc152..496c00cc2ac70e40098532dc3e40fad35764f8fc 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 5e3c6dffb168bd98b6a1b691c5a842f4ec441b73..d9bf59eb963d7ba053224f9c3dc9cbe3eda3ea90 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index cdf8ead9ea90516b81716d69502d12a48361e562..212c3b2b9a39e571e8b5e3cfa5d56d989d526995 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: IBT
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
diff --git a/ld/testsuite/ld-x86-64/property-x86-isa1-x32.d b/ld/testsuite/ld-x86-64/property-x86-isa1-x32.d
new file mode 100644 (file)
index 0000000..e50e135
--- /dev/null
@@ -0,0 +1,11 @@
+#source: property-x86-isa1.s
+#source: simple.s
+#as: --x32 -mx86-used-note=no
+#ld: -m elf32_x86_64 -z x86-64-v4
+#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 needed: x86-64-v2, x86-64-v4
+       <procesor-specific type 0xc0009000 data: 30 00 00 00 >
diff --git a/ld/testsuite/ld-x86-64/property-x86-isa1.d b/ld/testsuite/ld-x86-64/property-x86-isa1.d
new file mode 100644 (file)
index 0000000..fd05ade
--- /dev/null
@@ -0,0 +1,11 @@
+#source: property-x86-isa1.s
+#source: simple.s
+#as: --64 -defsym __64_bit__=1 -mx86-used-note=no
+#ld: -m elf_x86_64 -z x86-64-v4
+#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 needed: x86-64-v2, x86-64-v4
+       <procesor-specific type 0xc0009000 data: 30 00 00 00 >
diff --git a/ld/testsuite/ld-x86-64/property-x86-isa1.s b/ld/testsuite/ld-x86-64/property-x86-isa1.s
new file mode 100644 (file)
index 0000000..938dc78
--- /dev/null
@@ -0,0 +1,54 @@
+       .section ".note.gnu.property", "a"
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       .long 1f - 0f           /* name length */
+       .long 5f - 2f           /* data length */
+       .long 5                 /* note type */
+0:     .asciz "GNU"            /* vendor name */
+1:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+2:     .long 0xc0008002        /* pr_type.  */
+       .long 4f - 3f           /* pr_datasz.  */
+3:
+       .long 0x1
+4:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+5:
+       .section ".note.gnu.property", "a"
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       .long 1f - 0f           /* name length */
+       .long 5f - 2f           /* data length */
+       .long 5                 /* note type */
+0:     .asciz "GNU"            /* vendor name */
+1:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+2:     .long 0xc0009000        /* pr_type.  */
+       .long 4f - 3f           /* pr_datasz.  */
+3:
+       .long 0x30
+4:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+5:
diff --git a/ld/testsuite/ld-x86-64/property-x86-isa2-x32.d b/ld/testsuite/ld-x86-64/property-x86-isa2-x32.d
new file mode 100644 (file)
index 0000000..c0f1607
--- /dev/null
@@ -0,0 +1,9 @@
+#source: simple.s
+#as: --x32 -mx86-used-note=no
+#ld: -m elf32_x86_64 -z x86-64-v4
+#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 needed: x86-64-v4
diff --git a/ld/testsuite/ld-x86-64/property-x86-isa2.d b/ld/testsuite/ld-x86-64/property-x86-isa2.d
new file mode 100644 (file)
index 0000000..6a1d5ef
--- /dev/null
@@ -0,0 +1,9 @@
+#source: simple.s
+#as: --64 -defsym __64_bit__=1 -mx86-used-note=no
+#ld: -m elf_x86_64 -z x86-64-v4
+#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 needed: x86-64-v4
diff --git a/ld/testsuite/ld-x86-64/property-x86-isa3-x32.d b/ld/testsuite/ld-x86-64/property-x86-isa3-x32.d
new file mode 100644 (file)
index 0000000..864e452
--- /dev/null
@@ -0,0 +1,9 @@
+#source: simple.s
+#as: --x32 -mx86-used-note=no
+#ld: -r -m elf32_x86_64 -z x86-64-v4
+#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 needed: x86-64-v4
diff --git a/ld/testsuite/ld-x86-64/property-x86-isa3.d b/ld/testsuite/ld-x86-64/property-x86-isa3.d
new file mode 100644 (file)
index 0000000..5d2fe8a
--- /dev/null
@@ -0,0 +1,9 @@
+#source: simple.s
+#as: --64 -defsym __64_bit__=1 -mx86-used-note=no
+#ld: -r -m elf_x86_64 -z x86-64-v4
+#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 needed: x86-64-v4
index 4bb55e5dc10add33bc41a9bf787e0508a6a9f676..bc9857236c49a5cb55e16fc55c279e024f30a66f 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 7882df634cb44bf5bd993de4cda0ee52b4076c78..b61d272f689cf3978f9a22d916f5eca556d77a33 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index a815c0d8726473b591edc3dc955d1dfe26570405..28807f2f6e2d919854a82fddb78c00e6f42d9883 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 5977760a0ec1e5bbd0d4ceb683c92acabca1d331..d30e15c94851ede2609e698626779f518f298d66 100644 (file)
@@ -7,5 +7,5 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: <None>
-       x86 feature used: x86
+      Properties: x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 7321b6078d64f82bc21ef9ffccb6e40109a00c20..66839c3251677ba1e9f7526b52a7a26da1b89a5c 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index e91c100f8c59a598c241835d83337c9ca82176b3..e75dc3a617e5176de01d815410815c571a86289c 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 3447f55d4e414c225c7464fd7d2aba48a83b5326..f73ded63330aeadec174041301335a63fd14f7ab 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 0c647c9151f7ae3eb72c8a7752a17552a5d06fcd..a653cf241e901bfa25825b2a82de2349bfd36876 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 02bffac94b5309d9df637e292d5aa009f3578718..893bf31de8da3e22cdd3d2d516274ca5eef69457 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 0422825a08afef0fa135a5834547a8bab7780a2e..b7be8bc9fe1e507278fc573d04dc77eb8ce7c114 100644 (file)
@@ -7,6 +7,6 @@
 Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
-       x86 ISA used: SSE, SSE3, SSE4_1, AVX
+      Properties: x86 ISA needed: x86-64-v2, x86-64-v3, <unknown: 10>, <unknown: 20>
        x86 feature used: x86
+       x86 ISA used: x86-64-v3, <unknown: 8>, <unknown: 20>, <unknown: 80>
index 101fdfc7f18aa2a203eb934ca0fd1aca43af7b22..a04e30485052b1ba2982b9e2ac57d230d83f76eb 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index c31dc38dfad8a2371f4345d1050bc7dbf62e3269..04cce50b651823c2d8854cb5a0fde5683d79d598 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index 3528489003ec02a7d95d3f5b555665d92f3e8a68..f78e6f42805c48ce288bb4cae616a42b7f1e415e 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
index aac162621762e8df5da2aab0a790c08045ac9ac7..c96782cdfb42873fbbe24abd7e664149bd58ae68 100644 (file)
@@ -7,5 +7,5 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: x86 feature: SHSTK
-       x86 ISA used: <None>
        x86 feature used: x86
+       x86 ISA used: x86-64-baseline
diff --git a/ld/testsuite/ld-x86-64/simple.s b/ld/testsuite/ld-x86-64/simple.s
new file mode 100644 (file)
index 0000000..b2b025b
--- /dev/null
@@ -0,0 +1,4 @@
+       .text
+       .globl _start
+_start:
+       ret
index 59cad54a7996cd99c2ef9f78dd9cc86c1c6a3c52..91702076b97cedddf248044116faf448e66caf02 100644 (file)
@@ -323,6 +323,8 @@ run_dump_test "property-x86-4a-x32"
 run_dump_test "property-x86-4b-x32"
 run_dump_test "property-x86-5"
 run_dump_test "property-x86-5-x32"
+run_dump_test "property-x86-6"
+run_dump_test "property-x86-6-x32"
 run_dump_test "property-x86-ibt1a"
 run_dump_test "property-x86-ibt1b"
 run_dump_test "property-x86-ibt1a-x32"
@@ -438,6 +440,12 @@ run_dump_test "pr26711-2"
 run_dump_test "pr26711-2-x32"
 run_dump_test "pr26711-3"
 run_dump_test "pr26711-3-x32"
+run_dump_test "property-x86-isa1"
+run_dump_test "property-x86-isa1-x32"
+run_dump_test "property-x86-isa2"
+run_dump_test "property-x86-isa2-x32"
+run_dump_test "property-x86-isa3"
+run_dump_test "property-x86-isa3-x32"
 
 if ![istarget "x86_64-*-linux*"] {
     return