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: RFA: return_in_msb and complex-mode structures


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.


r~


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