This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][C/C++] Do not promote return arguments
On Mon, Aug 27, 2007 at 03:47:02PM +0200, Paolo Bonzini wrote:
> Richard Guenther wrote:
> >On Mon, 27 Aug 2007, Paolo Bonzini wrote:
> >
> >>>I did some investigation and i386 consistently does not set
> >>>TARGET_PROMOTE_FUNCTION_RETURN (that is, it returns QImode for
> >>>char return types from function_value).
> >>That seems wrong.
> >
> >Can you elaborate?
>
> If the ABI said (I might remember wrong) that they are returned
> extended, it should return SImode.
>
See
http://groups.google.com/group/ia32-abi/browse_thread/thread/f47e0106b21d9269
for QImode return value, the upper bits are undefined. We can
do whatever we want and shouldn't cause any problems.
H.J.