This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sibcall vs sign extension
- From: Richard Henderson <rth at redhat dot com>
- To: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 16 Sep 2002 11:42:07 -0700
- Subject: Re: sibcall vs sign extension
- References: <20020915145549.GA12074@mars.cs.mu.oz.au>
On Mon, Sep 16, 2002 at 12:55:49AM +1000, Fergus Henderson wrote:
> The extra sign extension instruction is generated because the
> return type gets promoted to `int'. Unfortunate GCC apparently
> does not realize that the value returned from the callee is
> already promoted, and insists on re-promoting it.
>
> Any ideas about how this could be rectified?
Optimization at the tree level should note that the types
are the same and not emit the extension.
> However, I'm not sure if there is
> enough type information still around at this point to
> distinguish the cases where the sign extension is unnecessary.
There isn't.
r~