This is the mail archive of the gcc-patches@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: [PATCH, i386]: PR target/14631: Fix pinsrw instruction


On Tue, Dec 28, 2004 at 11:26:08AM +0100, Uros Bizjak wrote:
>  if (REG_P (operands[2]))
>    operands[2] = gen_lowpart_SUBREG (HImode, operands[2]);

No, plain gen_lowpart is correct.  See below.

> +          (vec_duplicate:V4HI
> +            (subreg:HI
> +	      (match_operand:SI 2 "register_operand" "r") 0))
...
> -			(vec_duplicate:V4HI
> -			 (truncate:HI (match_operand:SI 2 "nonimmediate_operand" "rm")))

Putting the reg and mem cases in different patterns is wrong.

What you want for the register case is to use %k2, which will
force "eax" to be printed instead of "ax".  It has no effect
on memories at all, so it's still safe to use there.



r~


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