[PATCH] [MIPS] Add fix for loongson3 llsc errata

James Cowgill james.cowgill@mips.com
Fri Jan 26 12:12:00 GMT 2018


Hi,

On 24/01/18 01:57, Jiaxun Yang wrote:
> This patch adds fix for Loongson-3 llsc errata.
> 
> /gas
> 	* config/tc-mips.c (mips_fix_loongson3_llsc): New variables.
> 	(md_loongopts): Add New options -mfix-loongson3-llsc,
> 	-mno-fix-loongson3-llsc.
> 	(md_parse_option): Initialize variables via above options.
> 	(options): New enums for the above options.
> 	(md_assemble): Insert sync before ll/lld if fix enabled.
> 	* doc/c-mips.texi Document the -mfix-loongson3-llsc.
> 	* testsuit/gas/mips/loongson3a-4.d New.
> 	* testsuit/gas/mips/loongson3a-4.s New.

I'm interested to know what this errata is. Why do you need the extra
sync and what does it do?

Some time ago, I also noticed a kernel patch was submitted to do
something similar in their atomic routines. The patch also adds a sync
after some sc instructions as well. Is that not necessary?

https://patchwork.linux-mips.org/patch/16987/

Thanks,
James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20180126/89183fb5/attachment.sig>


More information about the Binutils mailing list