[PATCH] MIPS: Add option to work around CN68XXP1 PREF errata.

David Daney ddaney@caviumnetworks.com
Tue Sep 28 00:49:00 GMT 2010


The CN68XXP1 is a member of the OCTEON family of MIPS64 based SOCs.  The 
CPUs on this device have an erratum where execution of PREF instructions 
with hints in the range 0-4 and 6-24 occasionally lead to undefined 
behavior.

We have implemented a work around in the assembler where we replace PREF 
instructions that might fail with PREF 28.  This work around is 
enabled/disabled with the new command line options '-mfix-cn63xxp1' / 
'-mno-fix-cn63xxp1'.

Tested with --target=mips64-octeon-linux-gnu, no regressions.

OK to commit?

src/gas:
2010-09-27  David Daney  <ddaney@caviumnetworks.com>

	* config/tc-mips.c (mips_fix_cn63xxp1): New variable.
	(mips_ip):  Add errata work around when mips_fix_cn63xxp1 set.
	(OPTION_FIX_CN63XXP1, OPTION_NO_FIX_CN63XXP1): New enum options
	enumerations.
	(md_longopts): Add options for -mfix-cn63xxp1 and -mno-fix-cn63xxp1.
	(md_parse_option): Handle OPTION_FIX_CN63XXP1 and
	OPTION_NO_FIX_CN63XXP1.
	(md_show_usage): Add documentation for -mfix-cn63xxp1.
	* doc/c-mips.texi (-mfix-cn63xxp1, -mno-fix-cn63xxp1): Document
	the new options.

src/gas/testsuite:
2010-09-27  David Daney  <ddaney@caviumnetworks.com>

	* gas/mips/mips.exp (octeon-pref): Run the new test.
	* gas/mips/octeon-pref.s: New test.
	* gas/mips/octeon-pref.d: New expected results for the new test.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-cn63xxp1.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20100928/ef5f4743/attachment.ksh>


More information about the Binutils mailing list