This is the mail archive of the
mailing list for the GCC project.
Re: RFA: return_in_msb and complex-mode structures
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Nov 2004 17:17:38 -0800
- Subject: Re: RFA: return_in_msb and complex-mode structures
- References: <email@example.com>
On Thu, Nov 18, 2004 at 03:58:36PM +0000, Richard Sandiford wrote:
> ! /* Use ashr rather than lshr for right shifts. This is for the benefit
> ! of the MIPS port, which requires SImode values to be sign-extended
> ! when stored in 64-bit registers. */
This is the only part that worries me. This implies that the shift
is happening after the PROMOTE_MODE stuff, which means that we aren't
necessarily generating the correct code for some future target that
wants to use return_in_msb.
Seems to me that this shift should either happen before promote_mode
and promote_function_return are applied, or it should re-apply them
to choose lshr vs ashr.