sign/zero extension patterns
Richard Earnshaw
Richard.Earnshaw@arm.com
Tue Apr 27 18:17:00 GMT 2004
On Tue, 2004-04-27 at 17:16, Nathan Sidwell wrote:
> Hi,
> in porting gcc to a new target, I have both signed and unsigned byte loads,
> which obviously allow sign/zero extension to be done during a load. To
> enable this, I have the following expands and insns defined,
>
> (define_expand "extendqisi2"
> [(set (match_operand:SI 0 "register_operand" "")
> (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
> This seems a little clunky, what with all the SUBREG faffing about.
> Is this correct, or is it just fragile?
>
Try making the constraint for operand 1 "memory_operand".
R.
More information about the Gcc
mailing list