diff options
author | Paul Hua <paul.hua.gm@gmail.com> | 2019-02-19 17:57:16 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2019-02-19 17:57:16 +0000 |
commit | 6f2117ba3892110badc65a7126b19cec211acfa2 (patch) | |
tree | de74092f7e459a02ee1c1c04a2907250d2597650 /gas/configure.ac | |
parent | 179f2db0d9c397d7dd8a59907b84208b79f7f48c (diff) | |
download | gdb-6f2117ba3892110badc65a7126b19cec211acfa2.zip gdb-6f2117ba3892110badc65a7126b19cec211acfa2.tar.gz gdb-6f2117ba3892110badc65a7126b19cec211acfa2.tar.bz2 |
Fix a potential deadlock in some older Loongson 3A1000 MIPS processors.
* NEWS: Mention -m[no-]fix-loongson3-llsc.
* configure.ac: Add --enable-mips-fix-loongson3-llsc.
Define DEFAULT_MIPS_FIX_LOONGSON3_LLSC.
* config.in: Regenerated.
* configure: Likewise.
* config/tc-mips.c (sync_insn, mips_fix_loongson3_llsc):
New variables.
(options): New OPTION_FIX_LOONGSON3_LLSC,
OPTION_NO_FIX_LOONGSON3_LLSC.
(md_longopts): Add -m[no-]fix-loongson3-llsc.
(md_begin): Initialize sync insn.
(fix_loongson3_llsc): New.
(append_insn): Call fix_loongson3_llsc.
(md_parse_option): Handle OPTION_FIX_LOONGSON3_LLSC,
OPTION_NO_FIX_LOONGSON3_LLSC.
(md_show_usage): Display -m[no-]fix-loongson3-llsc.
* doc/c-mips.texi: Document -m[no-]fix-loongson3-llsc,
--enable-mips-fix-loongson3-llsc=[yes|no].
Diffstat (limited to 'gas/configure.ac')
-rw-r--r-- | gas/configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gas/configure.ac b/gas/configure.ac index cc4bae0..4b25b7c 100644 --- a/gas/configure.ac +++ b/gas/configure.ac @@ -111,6 +111,17 @@ AC_ARG_ENABLE(generate_build_notes, no) ac_default_generate_build_notes=0 ;; esac])dnl +# Decide if the MIPS assembler should default to enable MIPS fix Loongson3 +# LLSC errata. +ac_default_mips_fix_loongson3_llsc=unset +# Provide a configuration option to override the default. +AC_ARG_ENABLE(mips-fix-loongson3-llsc, + AS_HELP_STRING([--enable-mips-fix-loongson3-llsc], + [enable MIPS fix Loongson3 LLSC errata]), +[case "${enableval}" in + yes) ac_default_mips_fix_loongson3_llsc=1 ;; + no) ac_default_mips_fix_loongson3_llsc=0 ;; +esac])dnl # Decide if the x86 ELF assembler should default to generating GNU x86 # used ISA and feature properties. @@ -687,6 +698,13 @@ AC_DEFINE_UNQUOTED(DEFAULT_RISCV_ATTR, $ac_default_generate_riscv_attr, [Define to 1 if you want to generate RISC-V arch attribute by default.]) +if test ${ac_default_mips_fix_loongson3_llsc} = unset; then + ac_default_mips_fix_loongson3_llsc=0 +fi +AC_DEFINE_UNQUOTED(DEFAULT_MIPS_FIX_LOONGSON3_LLSC, + $ac_default_mips_fix_loongson3_llsc, + [Define to 1 if you want to fix Loongson3 LLSC Errata 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 |