Fix PR target/16494

Eric Botcazou ebotcazou@libertysurf.fr
Tue Jul 13 20:19:00 GMT 2004


I discovered this yesterday: on non-V9 targets, when delay slots are not 
filled, FP conditional branches are unnecessarily reversed.  See the PR for 
an example.

This was inadvertently introduced by:

2003-10-01  Eric Botcazou  <ebotcazou@libertysurf.fr>

	PR optimization/11753
	* config/sparc/sparc.md (length attribute) [fcc branch]: Add 1 to
	the length in the non-V9 case.

because there is an "undocumented" side-effect associated with having a 
length greater or equal to 3 for conditional branches: output_cbranch will 
automatically reverse the branch. *sigh*

Fixed by restricting the feature to the V9 case and adding a warning.  
Bootstrapped/regtested on sparc64-sun-solaris2.9, sparc-sun-solaris2.8, 
sparc-sun-solaris2.7, sparc-sun-solaris2.6 and sparc-sun-solaris2.5.1.

Applied to all active branches.


2004-07-13  Eric Botcazou  <ebotcazou@libertysurf.fr>

	PR target/16494
	* config/sparc/sparc.c (output_cbranch): Properly guard
	the code handling far branches with TARGET_V9.
	* config/sparc/sparc.md (length attribute): Document the
	side-effect of having a length greater or equal to 3.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr16494.diff
Type: text/x-diff
Size: 1667 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040713/75999dec/attachment.bin>


More information about the Gcc-patches mailing list