Skip to content

Commit 6f2117b

Browse files
ChenghuaXunickclifton
authored andcommitted
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].
1 parent 179f2db commit 6f2117b

File tree

7 files changed

+285
-57
lines changed

7 files changed

+285
-57
lines changed

gas/ChangeLog

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
2019-02-19 Paul Hua <[email protected]>
2+
3+
* NEWS: Mention -m[no-]fix-loongson3-llsc.
4+
* configure.ac: Add --enable-mips-fix-loongson3-llsc.
5+
Define DEFAULT_MIPS_FIX_LOONGSON3_LLSC.
6+
* config.in: Regenerated.
7+
* configure: Likewise.
8+
* config/tc-mips.c (sync_insn, mips_fix_loongson3_llsc):
9+
New variables.
10+
(options): New OPTION_FIX_LOONGSON3_LLSC,
11+
OPTION_NO_FIX_LOONGSON3_LLSC.
12+
(md_longopts): Add -m[no-]fix-loongson3-llsc.
13+
(md_begin): Initialize sync insn.
14+
(fix_loongson3_llsc): New.
15+
(append_insn): Call fix_loongson3_llsc.
16+
(md_parse_option): Handle OPTION_FIX_LOONGSON3_LLSC,
17+
OPTION_NO_FIX_LOONGSON3_LLSC.
18+
(md_show_usage): Display -m[no-]fix-loongson3-llsc.
19+
* doc/c-mips.texi: Document -m[no-]fix-loongson3-llsc,
20+
--enable-mips-fix-loongson3-llsc=[yes|no].
21+
122
2019-02-10 H.J. Lu <[email protected]>
223

324
PR gas/24165

gas/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
-*- text -*-
22

3+
* For MIPS, Add -m[no-]fix-loongson3-llsc option to fix (or not) Loongson3 LLSC
4+
Errata. Add a --enable-mips-fix-loongson3-llsc=[yes|no] configure time option
5+
to set the default behavior. Set the default if the configure option is not used
6+
to "no".
7+
38
Changes in 2.32:
49

510
* Add -mvexwig=[0|1] option to x86 assembler to control encoding of

gas/config.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
/* Define to 1 if you want to generate x86 relax relocations by default. */
5151
#undef DEFAULT_GENERATE_X86_RELAX_RELOCATIONS
5252

53+
/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */
54+
#undef DEFAULT_MIPS_FIX_LOONGSON3_LLSC
55+
5356
/* Define to 1 if you want to generate RISC-V arch attribute by default. */
5457
#undef DEFAULT_RISCV_ATTR
5558

0 commit comments

Comments
 (0)