[SPARC] Follow-up to latest LEON3 workaround

Eric Botcazou ebotcazou@adacore.com
Sat Mar 15 21:52:00 GMT 2014


This is a follow-up to
  http://gcc.gnu.org/ml/gcc-patches/2013-07/msg00959.html
which implemented the workaround for the data cache nullify issues on LEON3.

The errata sheet wasn't crystal clear and didn't say anything about delay 
slots, but it appears that they can come into play so the attached patch 
prevents integer loads from being put in delay slots with -mfix-ut699.

Tested on SPARC/Solaris, applied on the mainline and 4.8 branch.


2014-03-15  Eric Botcazou  <ebotcazou@adacore.com>

	* config/sparc/sparc-protos.h (tls_call_delay): Delete.
	(eligible_for_call_delay): New prototype.
	* config/sparc/sparc.c (tls_call_delay): Rename into...
	(eligible_for_call_delay): ...this.  Return false if the instruction
	cannot be put in the delay slot of a branch.
	(eligible_for_restore_insn): Simplify.
	(eligible_for_return_delay): Return false if the instruction cannot be
	put in the delay slot of a branch and simplify.
	(eligible_for_sibcall_delay): Return false if the instruction cannot be
	put in the delay slot of a branch.
	* config/sparc/sparc.md (fix_ut699): New attribute.
	(tls_call_delay): Delete.
	(in_call_delay): Reimplement.
	(eligible_for_sibcall_delay): Rename into...
	(in_sibcall_delay): ...this.
	(eligible_for_return_delay): Rename into...
	(in_return_delay): ...this.
	(in_branch_delay): Reimplement.
	(in_uncond_branch_delay): Delete.
	(in_annul_branch_delay): Delete.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 8642 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140315/d56192e6/attachment.bin>


More information about the Gcc-patches mailing list