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: SH: may miscompile zero extension and test


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


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