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: S/390: Fix warnings in "*setmem_long..." patterns.


On 12/02/2015 02:11 PM, Andreas Krebbel wrote:
> On 12/02/2015 01:51 PM, Ulrich Weigand wrote:
>> Andreas Krebbel wrote:
>>> On 12/02/2015 11:12 AM, Dominik Vogt wrote:
>>>> Hopefully, this is correct now; it does pass the functional test case
>>>> that's part of the patch.  Unfortunately the define_insn patters
>>>> had to be duplicated because of the new subreg offsets.  
>>>
>>> The number of patterns could possibly be reduced using the define_subst machinery.  I'm looking into
>>> this for some other changes. No need to do this right now. We can do this later on-top.
>>
>> For this particular issue, shouldn't a simple mode_attr be OK?
>> I see that the sh port uses this:
>>
>> (define_mode_attr lowpart_be [(QI "3") (HI "2")])
>>
>>   [(set (reg:SI T_REG)
>>         (eq:SI
>>           (subreg:QIHI
>>             (and:SI (match_operand:SI 0 "arith_reg_operand")
>>                     (match_operand:SI 1 "arith_reg_operand")) <lowpart_be>)
>>           (const_int 0)))]
> 
> Unfortunately in our case the attribute value doesn't only depend on the mode.  It also depends on
> zarch/esa.  We would need some kind of conditional attribute.

However, we could probably at least merge the two zarch variants.

The define_subst is probably the right thing for adding the AND around the padding byte operand.

Bye,

-Andreas-



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