[PATCH, i386]: PR target/14631: Fix pinsrw instruction (take 2)
Uros Bizjak
uros@kss-loka.si
Wed Dec 29 07:15:00 GMT 2004
Richard Henderson wrote:
>> if (REG_P (operands[2]))
>> operands[2] = gen_lowpart_SUBREG (HImode, operands[2]);
>>
>>
>
>No, plain gen_lowpart is correct. See below.
>
>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.
>
>
>
Yes, %k2 solves the problems!
Attached patch was boostrapped on pentium4-pc-linux-gnu, regtest is in
progress. It generates correct code for mem and reg cases.
2004-12-28 Richard Henderson <rth@redhat.com>
Uros Bizjak <uros@kss-loka.si>
PR target/14631
* config/i386/i386.c (ix86_expand_builtin): [IX86_BUILTIN_PINSRW,
IX86_BUILTIN_PINSRW128]: Fix wrong selector range in error message.
* config/i386/i386.md (mmx_pinsrw, sse2_pinsrw): Fix selector
handling.
(*mmx_pinsrw, *sse2_pinsrw): New patterns.
* config/i386/i386/predicates.md (const_pow2_1_to_8_operand,
const_pow2_1_to_128_operand): New predicates.
Uros.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pinsrw.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041229/7783995c/attachment.ksh>
More information about the Gcc-patches
mailing list