summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-08-31 04:31:08 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-08-31 04:31:20 -0700
commitb4a3a7b44c98a9f78a27bd34d0d98741a0446e23 (patch)
treebf4dfc7e3ecaf69d1636fc4699203a5ce4e7989d /gas/configure.ac
parentAutomatic date update in version.in (diff)
downloadbinutils-gdb-b4a3a7b44c98a9f78a27bd34d0d98741a0446e23.tar.gz
binutils-gdb-b4a3a7b44c98a9f78a27bd34d0d98741a0446e23.tar.bz2
binutils-gdb-b4a3a7b44c98a9f78a27bd34d0d98741a0446e23.zip
x86: Extend assembler to generate GNU property notes
Add -mx86-used-note=[yes|no] option to generate (or not) GNU property notes with GNU_PROPERTY_X86_FEATURE_2_USED and GNU_PROPERTY_X86_ISA_1_USED properties. If the assembly input contains no instructions, set the GNU_PROPERTY_X86_UINT32_VALID bit in GNU_PROPERTY_X86_FEATURE_2_USED property. Add a --enable-x86-used-note configure time option to set the default behavior. Set the default if the configure option is not used to "no". * NEWS: Mention -mx86-used-note=[no|yes]. * configure.ac: Add --enable-x86-used-note. Define DEFAULT_X86_USED_NOTE. * config.in: Regenerated. * configure: Likewise. * config/tc-i386.c (x86_isa_1_used): New. (x86_feature_2_used): Likewise. (x86_used_note): Likewise. (_i386_insn): Add has_regmmx, has_regxmm, has_regymm and has_regzmm. (build_modrm_byte): Set i.has_regmmx, i.has_regzmm. i.has_regymm and i.has_regxmm. (x86_cleanup): New function. (output_insn): Update x86_isa_1_used and x86_feature_2_used. (OPTION_X86_USED_NOTE): New. (md_longopts): Add -mx86-used-note=. (md_parse_option): Handle OPTION_X86_USED_NOTE. (md_show_usage): Display -mx86-used-note=. * config/tc-i386.h (x86_cleanup): New prototype. (md_cleanup): New. * doc/c-i386.texi: Document -mx86-used-note=.
Diffstat (limited to 'gas/configure.ac')
-rw-r--r--gas/configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/gas/configure.ac b/gas/configure.ac
index 79714eb3dca..d8fddfb19e4 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -113,6 +113,19 @@ AC_ARG_ENABLE(generate_build_notes,
esac])dnl
+# Decide if the x86 ELF assembler should default to generating GNU x86
+# used ISA and feature properties.
+ac_default_generate_x86_used_note=unset
+# Provide a configuration option to override the default.
+AC_ARG_ENABLE(x86-used-note,
+ AS_HELP_STRING([--enable-x86-used-note],
+ [generate GNU x86 used ISA and feature properties]),
+[case "${enableval}" in
+ yes) ac_default_generate_x86_used_note=1 ;;
+ no) ac_default_generate_x86_used_note=0 ;;
+esac])dnl
+
+
using_cgen=no
AM_BINUTILS_WARNINGS
@@ -613,6 +626,14 @@ AC_DEFINE_UNQUOTED(DEFAULT_GENERATE_BUILD_NOTES,
[Define to 1 if you want to generate GNU Build attribute notes
by default, if none are contained in the input.])
+if test ${ac_default_generate_x86_used_note} = unset; then
+ ac_default_generate_x86_used_note=0
+fi
+AC_DEFINE_UNQUOTED(DEFAULT_X86_USED_NOTE,
+ $ac_default_generate_x86_used_note,
+ [Define to 1 if you want to generate GNU x86 used ISA and feature
+ properties by default.])
+
if test x$ac_default_compressed_debug_sections = xyes ; then
AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.])
fi