From: Jan Beulich Date: Mon, 2 Dec 2024 08:38:47 +0000 (+0100) Subject: x86: always set ISA_1_BASELINE property for 64-bit objects X-Git-Tag: gdb-16-branchpoint~254 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a96a8b7367b2cd51ff32c69e516dfbe0204c8008;p=thirdparty%2Fbinutils-gdb.git x86: always set ISA_1_BASELINE property for 64-bit objects The baseline was, afaik, specifically chosen to align with the baseline ISA of x86-64. It therefore makes no sense to emit that property only conditionally; if anything it confuses tools analyzing the difference between generated object files, which may result from just added / changed / removed (entirely ISA-independent) code, without any change to the enabled extensions. Compilers, after all, are free to use these baseline "extensions" when generating 64-bit code. While changing the one testcase that needs adjustment, also correct its misleading name (to be in sync with the filename). --- diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 6720bc8e38b..922c9588fd0 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -12195,7 +12195,8 @@ output_insn (const struct last_insn *last_insn) if (is_cpu (&i.tm, CpuXSAVEC)) x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_XSAVEC; - if (x86_feature_2_used + if (object_64bit + || x86_feature_2_used || is_cpu (&i.tm, CpuCMOV) || is_cpu (&i.tm, CpuSYSCALL) || i.tm.mnem_off == MN_cmpxchg8b) diff --git a/gas/testsuite/gas/i386/x86-64-property-14.d b/gas/testsuite/gas/i386/x86-64-property-14.d index 41503c310ba..c4f2ae3735b 100644 --- a/gas/testsuite/gas/i386/x86-64-property-14.d +++ b/gas/testsuite/gas/i386/x86-64-property-14.d @@ -1,9 +1,9 @@ -#name: x86-64 property 13 +#name: x86-64 property 14 #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 + Properties: x86 ISA used: x86-64-baseline, x86-64-v2 x86 feature used: x86 diff --git a/ld/testsuite/ld-x86-64/pr24322a-x32.d b/ld/testsuite/ld-x86-64/pr24322a-x32.d index 4bbe33ca355..8009f910974 100644 --- a/ld/testsuite/ld-x86-64/pr24322a-x32.d +++ b/ld/testsuite/ld-x86-64/pr24322a-x32.d @@ -9,4 +9,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000024 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: SHSTK x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/pr24322a.d b/ld/testsuite/ld-x86-64/pr24322a.d index 4a790571cd7..6ddb7a7163d 100644 --- a/ld/testsuite/ld-x86-64/pr24322a.d +++ b/ld/testsuite/ld-x86-64/pr24322a.d @@ -9,4 +9,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000030 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: SHSTK x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/pr24322b-x32.d b/ld/testsuite/ld-x86-64/pr24322b-x32.d index 8356f3a4456..76ebd1cfa37 100644 --- a/ld/testsuite/ld-x86-64/pr24322b-x32.d +++ b/ld/testsuite/ld-x86-64/pr24322b-x32.d @@ -9,4 +9,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000024 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: SHSTK x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/pr24322b.d b/ld/testsuite/ld-x86-64/pr24322b.d index deca33e9664..6ee01464434 100644 --- a/ld/testsuite/ld-x86-64/pr24322b.d +++ b/ld/testsuite/ld-x86-64/pr24322b.d @@ -9,4 +9,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000030 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: SHSTK x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/pr24458a-x32.d b/ld/testsuite/ld-x86-64/pr24458a-x32.d index 6a673c8c70d..9909f1760d6 100644 --- a/ld/testsuite/ld-x86-64/pr24458a-x32.d +++ b/ld/testsuite/ld-x86-64/pr24458a-x32.d @@ -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 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/pr24458a.d b/ld/testsuite/ld-x86-64/pr24458a.d index 73fbcaebcf7..d0fbc3390fb 100644 --- a/ld/testsuite/ld-x86-64/pr24458a.d +++ b/ld/testsuite/ld-x86-64/pr24458a.d @@ -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 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/pr24458b-x32.d b/ld/testsuite/ld-x86-64/pr24458b-x32.d index d69083075a6..9f80ed20d99 100644 --- a/ld/testsuite/ld-x86-64/pr24458b-x32.d +++ b/ld/testsuite/ld-x86-64/pr24458b-x32.d @@ -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 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/pr24458b.d b/ld/testsuite/ld-x86-64/pr24458b.d index ae78c974a19..ee1894894d1 100644 --- a/ld/testsuite/ld-x86-64/pr24458b.d +++ b/ld/testsuite/ld-x86-64/pr24458b.d @@ -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 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/pr24458c-x32.d b/ld/testsuite/ld-x86-64/pr24458c-x32.d index b934c4bb673..7107c3f9892 100644 --- a/ld/testsuite/ld-x86-64/pr24458c-x32.d +++ b/ld/testsuite/ld-x86-64/pr24458c-x32.d @@ -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 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/pr24458c.d b/ld/testsuite/ld-x86-64/pr24458c.d index 7016655a933..690088a532f 100644 --- a/ld/testsuite/ld-x86-64/pr24458c.d +++ b/ld/testsuite/ld-x86-64/pr24458c.d @@ -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 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/property-1a.r b/ld/testsuite/ld-x86-64/property-1a.r index 7c41da862e2..cbdd6477a45 100644 --- a/ld/testsuite/ld-x86-64/property-1a.r +++ b/ld/testsuite/ld-x86-64/property-1a.r @@ -4,6 +4,6 @@ Displaying notes found in: .note.gnu.property GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 Properties: no copy on protected x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline #pass diff --git a/ld/testsuite/ld-x86-64/property-2a.r b/ld/testsuite/ld-x86-64/property-2a.r index ab94fdf14a3..51bfde81633 100644 --- a/ld/testsuite/ld-x86-64/property-2a.r +++ b/ld/testsuite/ld-x86-64/property-2a.r @@ -4,6 +4,6 @@ Displaying notes found in: .note.gnu.property GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 Properties: stack size: 0x800000 x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline #pass diff --git a/ld/testsuite/ld-x86-64/property-x86-4a-x32.d b/ld/testsuite/ld-x86-64/property-x86-4a-x32.d index 226bfca6342..cf5046f6e02 100644 --- a/ld/testsuite/ld-x86-64/property-x86-4a-x32.d +++ b/ld/testsuite/ld-x86-64/property-x86-4a-x32.d @@ -9,4 +9,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 Properties: no copy on protected x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/property-x86-4a.d b/ld/testsuite/ld-x86-64/property-x86-4a.d index 0bec21f8550..7c2bb782d89 100644 --- a/ld/testsuite/ld-x86-64/property-x86-4a.d +++ b/ld/testsuite/ld-x86-64/property-x86-4a.d @@ -9,4 +9,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000028 NT_GNU_PROPERTY_TYPE_0 Properties: no copy on protected x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt5-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt5-x32.d index f03b321c1a2..d9bf59eb963 100644 --- a/ld/testsuite/ld-x86-64/property-x86-ibt5-x32.d +++ b/ld/testsuite/ld-x86-64/property-x86-ibt5-x32.d @@ -8,4 +8,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000024 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: IBT x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt5.d b/ld/testsuite/ld-x86-64/property-x86-ibt5.d index 101f44a25db..212c3b2b9a3 100644 --- a/ld/testsuite/ld-x86-64/property-x86-ibt5.d +++ b/ld/testsuite/ld-x86-64/property-x86-ibt5.d @@ -8,4 +8,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000030 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: IBT x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/property-x86-lam-u48-5.d b/ld/testsuite/ld-x86-64/property-x86-lam-u48-5.d index 623dfbd979c..58159b03a7c 100644 --- a/ld/testsuite/ld-x86-64/property-x86-lam-u48-5.d +++ b/ld/testsuite/ld-x86-64/property-x86-lam-u48-5.d @@ -8,4 +8,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000030 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: LAM_U48, LAM_U57 x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/property-x86-lam-u57-5.d b/ld/testsuite/ld-x86-64/property-x86-lam-u57-5.d index d0b69e67e27..6401ce88823 100644 --- a/ld/testsuite/ld-x86-64/property-x86-lam-u57-5.d +++ b/ld/testsuite/ld-x86-64/property-x86-lam-u57-5.d @@ -8,4 +8,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000030 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: LAM_U57 x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk5-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk5-x32.d index 0199d3afa04..f78e6f42805 100644 --- a/ld/testsuite/ld-x86-64/property-x86-shstk5-x32.d +++ b/ld/testsuite/ld-x86-64/property-x86-shstk5-x32.d @@ -8,4 +8,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000024 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: SHSTK x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk5.d b/ld/testsuite/ld-x86-64/property-x86-shstk5.d index bba3476e822..c96782cdfb4 100644 --- a/ld/testsuite/ld-x86-64/property-x86-shstk5.d +++ b/ld/testsuite/ld-x86-64/property-x86-shstk5.d @@ -8,4 +8,4 @@ Displaying notes found in: .note.gnu.property GNU 0x00000030 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: SHSTK x86 feature used: x86 - x86 ISA used: + x86 ISA used: x86-64-baseline