Re: [RFA] mips_push_arguments(): Make O64 ABI test explicit

Kevin Buettner
2002-08-01T22:18:14Z

On Aug 1, 5:55pm, Andrew Cagney wrote:

> /* A non-floating-point argument being passed in a
> general register. If a struct or union, and if
> the remaining length is smaller than the register
> size, we have to adjust the register value on
> big endian targets.
>
> It does not seem to be necessary to do the
> same for integral types.
>
> Also don't do this adjustment on EABI and O64
> binaries.
>
> cagney/2001-07-23: gdb/179: Also, GCC, when
> outputting LE O32 with sizeof (struct) <
> MIPS_SAVED_REGSIZE, generates a left shift as
> part of storing the argument in a register a
> register (the left shift isn't generated when
> sizeof (struct) >= MIPS_SAVED_REGSIZE). Since it
> is quite possible that this is GCC contradicting
> the LE/O32 ABI, GDB has not been adjusted to
> accommodate this. Either someone needs to
> demonstrate that the LE/O32 ABI specifies such a
> left shift OR this new ABI gets identified as
> such and GDB gets tweaked accordingly. */
>
> Sounds like the comment should be updated to mention a few more ABIs and
> confirm that it is GCC that is wrong. I'll assume this patch is withdrawn.

It is for the moment.

If you read further in the thread, you'll see that I've verified that
it's gcc which is wrong. That being the case, more than just the comment
will need to change. (IMO, of course.)

I'll wait a bit for further discussion before submitting a new patch.

Kevin