SH: may miscompile zero extension and test
kaz Kojima
kkojima@rr.iij4u.or.jp
Sun Aug 10 09:26:00 GMT 2003
Jim Wilson <wilson@tuliptree.org> wrote:
> Subregs act much like regs when recognizing operands. So if (REG:SI
> ...) is a valid operand, then so is (subreg:SI ...).
>
> The SH port defines WORD_REGISTER_OPERATIONS, which means if you put a
> QImode value in a register, then you can interchangable use either
> (reg:SI) or (reg:qi) because moving a QImode value sets the entire register.
>
> You do have to get the signedness right though. There is some
> interaction with LOAD_EXTEND_OP here to only generate the paradoxical
> subreg when the signedness is OK. There are occasional problems with
> this code.
Thanks for the explanation. I'm slowly understanding about such
subregs.
> It isn't obvious what is wrong from your assembly language fragment.
I'll look the another RTL dumps again to see why zero extension is
removed from the resulting code.
Regards,
kaz
More information about the Gcc
mailing list