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] Fix ubsan i?86 {add,sub,mul}v<mode>4 patterns


On Tue, Mar 25, 2014 at 8:18 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Mar 25, 2014 at 04:06:40PM +0100, Jakub Jelinek wrote:
>> On Tue, Mar 25, 2014 at 12:39:18PM +0100, Uros Bizjak wrote:
>> > The patch is OK in principle, but we could follow established practice
>> > and use separate predicates - please see general_szext_operand mode
>> > attribute definition.
>>
>> So like this?  I've tried to use non-VOIDmode of the predicates that were
>> used previously (i.e. general_operand or x86_64_general_operand).
>>
>> 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
>>
>>       * config/i386/i386.md (general_sext_operand): New mode attr.
>>       (addv<mode>4, subv<mode>4, mulv<mode>4): If operands[2] is CONST_INT,
>>       don't generate (sign_extend (const_int)).
>>       (*addv<mode>4, *subv<mode>4, *mulv<mode>4): Disallow CONST_INT_P
>>       operands[2].  Use We constraint instead of <i> and <general_sext_operand>
>>       predicate instead of <general_operand>.
>>       (*addv<mode>4_1, *subv<mode>4_1, *mulv<mode>4_1): New insns.
>>       * config/i386/constraints.md (We): New constraint.
>>       * config/i386/predicates.md (x86_64_sext_operand,
>>       sext_operand): New predicates.
>
> Now successfully bootstrapped/regtested on x86_64-linux and i686-linux.

The patch is OK for mainline.

Thanks,
Uros.


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