This is the mail archive of the gcc@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: sibcall vs sign extension


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~


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