Fix PR target/13557
Eric Botcazou
ebotcazou@libertysurf.fr
Tue Jan 20 07:43:00 GMT 2004
This is a deviation from the psABI on SPARC64. The compiler passes the
structure
struct sf {
float f;
};
in %f1, while the ABI mandates %f0. The structure is sent with SFmode to the
FUNCTION_ARG macro, which fools it into thinking that it sees a bare float.
Fixed by reordering the cases in the FUNCTION_ARG macro. The patch was
bootstrapped/regtested on sparc64-sun-solaris2.9 (except Ada and libgcj) and
compat-regtested against the Sun ONE Studio 8 compiler. It fixes:
FAIL: gcc.dg/compat/struct-by-value-5 c_compat_x_tst.o-c_compat_y_alt.o
execute
FAIL: gcc.dg/compat/struct-by-value-5 c_compat_x_alt.o-c_compat_y_tst.o
execute
in the latter testsuite. Applied to mainline and 3.4 branch (the 3.4 branch
already contains ABI fixes which makes it incompatible with 3.3.x).
2004-01-20 Eric Botcazou <ebotcazou@libertysurf.fr>
PR target/13557
* config/sparc/sparc.c (function_arg): Reorder the cases.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr13557.diff
Type: text/x-diff
Size: 2362 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040120/58aad8df/attachment.bin>
More information about the Gcc-patches
mailing list