This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: regression for 3.1: bad sign extension?
- From: Bob Wilson <bwilson at tensilica dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 14 Mar 2002 09:24:07 -0800
- Subject: Re: regression for 3.1: bad sign extension?
- Organization: Tensilica, Inc.
- References: <3C8FEA15.116BCECD@tensilica.com> <jmg0334kaz.fsf@desire.geoffk.org>
OK, that makes sense.... It implies that (1) the real bug in this case
occurs when the subsequent zero-extend is incorrectly removed during the
combine phase, and that (2) I'm going to have to do some work to get GCC
to avoid explicit zero-extend operations, which are relatively expensive
on some Xtensa processors.
Thanks for pointing me in the right direction here, Geoff.
Geoff Keating wrote:
> Bob Wilson <bwilson@tensilica.com> writes:
>
>
>>The problem occurs when there is an unsigned short (16-bits, HI mode)
>>that gets (incorrectly?) sign-extended by this code.
>
>
> There's no such thing as an 'unsigned short' in RTL. All HImode
> values are the same, and there is only one way to write a HImode constant
> of 0xffff: (const_int -1).