MIPS 3.4.0 ABI and one-sized arrays
Eric Botcazou
ebotcazou@act-europe.fr
Thu Jun 3 10:15:00 GMT 2004
Hi,
The MIPS ABI fixes introduced a couple of problems for one-sized arrays in
Ada on mips-sgi-irix6.5 (default ABI, n32 if I read correctly):
- the compiler ICEs on functions returning an one-sized array of floats
(emit_move_insn between SImode and SFmode),
- one-sized arrays of integers are returned in the upper half of $2, while
they were returned in the lower half previously. If I read correctly again,
this ABI change is not listed in http://gcc.gnu.org/gcc-3.4/mips-abi.html.
The keypoint is that such arrays are given the mode of their element by
stor-layout.c, so they were previously handled like scalar values. Now
mips_return_in_msb catches them
/* Implement TARGET_RETURN_IN_MSB. For n32 & n64, we should return
a value in the most significant part of $2/$3 if:
- the target is big-endian;
- the value has a structure or union type (we generalize this to
cover aggregates from other languages too); and
- the structure is not returned in floating-point registers. */
and we end up with the current unsatisfactory situation.
How should that be fixed? A straightforward solution is to let
mips_return_in_msb reject arrays with non-BLKmode, but this would mean
changing the ABI for one-sized arrays of integers.
--
Eric Botcazou
More information about the Gcc
mailing list