Fix another ABI problem on SPARC64

Eric Botcazou ebotcazou@libertysurf.fr
Thu Jan 22 11:29:00 GMT 2004


Structures containing complex floating-point members are not passed in FP 
registers if they are located past the 6 first slots in the parameter array.

Fixed by using FLOAT_TYPE_P to detect the FP fields of the structures.  The 
patch was bootstrapped/regtested on sparc64-sun-solaris2.8 (except Ada and 
libgcj) and compat-regtested against the Sun ONE Studio 8 compiler. It fixes

FAIL: gcc.dg/compat/struct-by-value-16 c_compat_x_tst.o-c_compat_y_alt.o 
execute  Scf2
FAIL: gcc.dg/compat/struct-by-value-16 c_compat_x_alt.o-c_compat_y_tst.o 
execute  Scf2

in the latter testsuite.

Applied to mainline and 3.4 branch.


2004-01-22  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* config/sparc/sparc.c (function_arg_slotno): Use
	FLOAT_TYPE_P to detect FP fields in structures.
	(function_arg_record_value_1): Likewise.
	(function_arg_record_value_2): Likewise.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: complex_float.diff
Type: text/x-diff
Size: 1752 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040122/a650b990/attachment.bin>


More information about the Gcc-patches mailing list