This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Removal of FUNCTION_ARG_REG_LITTLE_ENDIAN macro


FUNCTION_ARG_REG_LITTLE_ENDIAN is the wrong solution for your problem.
It is being taken out because it doesn't work.

What you want to do is use a PARALLEL instead of a REG as the FUNCTION_ARG
and/or FUNCTION_VALUE result.  This takes you to the emit_group_{load,store}
function in expr.c, which by default loads the value left-aligned big-endian
and right-aligned little-endian.  This is presumably the behaviour you are
looking for, though it isn't clearly stated in your April message.

The HPPA port has already switched from F_A_R_L_E to using a PARALLEL.  The
IA-64 port will switch soon.  If the rs6000 port needs this same behaviour,
then it should switch also.

Is it only function return values that are broken?  Or is it both function
return values and function arguments?  It looks like only function return
values are broken.

Is the behaviour left-align big-endian and right-align little-endian the
behaviour that you want?  I don't have any rs6000 SVR4 ABI documents handy.

David Edelsohn asked a question about varargs (sic), but I think that is not
an issue, because only return values are affected.

Geoff Keating and David both expressed concerns about ABI changes for other
targets, so we perhaps should only enable this for the SYSV ABI, and then
document that this is another difference between the linux and SYSV ABIs.
We should check to see if the AIX ABI has the same problem.  If gcc is
incompatible with the IBM compiler, then we should fix gcc.

Since I am trying to get rid of F_A_R_L_E, I am willing to help you write
the FUNCTION_VALUE patch you need to make this work.

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]