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.

-Andreas-


Reply via email to