This is the mail archive of the
mailing list for the GCC project.
Re: ia64-hpux fix compat/struct-by-value-5
Jim Wilson <firstname.lastname@example.org> writes:
> On Tue, 2004-02-17 at 00:16, Zack Weinberg wrote:
>> ia64-hpux bootstrap in progress; comments?
> I forgot to comment on the patch. I think the BYTES_BIG_ENDIAN checks
> are unnecessary but harmless. If you always create the DImode parallel,
> then we get the right result for both big and little endian. So the
> checks can either be there or not be there, your choice. I think we get
> slightly more efficient code for little-endian if the BYTES_BIG_ENDIAN
> checks are there, so I don't mind them being there.
I did it this way mainly because it's done that way in the block
above, but if we generate more efficient little-endian code this
way then I vote to keep it.
> Isn't this going to break handling of regular SFmode arguments? I think
> you only want to do this when hfa_mode is SFmode.
> I think the second part of the patch is unnecessary. The special hfa
> code at the top handles all cases except prototype && !named, so only
> the first part of your patch is doing something useful. The second part
> is unreachable code.
According to the "Itanium(TM) Software Conventions and Runtime
Architecture Guide", bare SFmode [in fact, all floating point]
quantities are passed in general registers when they're varargs
parameters. At which point the same alignment rule applies to
them. So I think that the patch is correct as is, and that both
chunks are necessary (the second part handles the case where an
unprototyped function is called with float arguments).