[PATCH][MIPS] GAS: Fix Loongson3 LLSC errata.
Paul Hua
paul.hua.gm@gmail.com
Fri Nov 30 12:46:00 GMT 2018
Hi:
In some older Loongson 3A1000 processors there is a LL/SC errata that
can cause the CPU to deadlock occasionally. The details are very
complicated. We find a way to work around this errata by adding a sync
before ll/lld instruction.
This patch also add a configure options
--enable-mips-fix-loongson3-llsc=[yes|no] to enable fix-loongson3-llsc
by config.
[MIPS] GAS: Fix Loongson3 LLSC errata.
gas/
* 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].
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-MIPS-GAS-Fix-Loongson3-LLSC-errata.patch
Type: text/x-patch
Size: 15659 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20181130/8277c6ff/attachment.bin>
More information about the Binutils
mailing list