[PATCH] x86: always set ISA_1_BASELINE property for 64-bit objects
Jan Beulich
jbeulich@suse.com
Fri Nov 15 12:35:49 GMT 2024
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).
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -12135,7 +12135,8 @@ output_insn (const struct last_insn *las
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)
--- 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
More information about the Binutils
mailing list