gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: PATCH: new port: Moxie

Subject: Re: PATCH: new port: Moxie
From: Jakub Jelinek
Date: Fri, 5 Jun 2009 00:04:23 +0200
On Thu, Jun 04, 2009 at 06:19:41PM +0200, Paolo Bonzini wrote:
>>> +(define_predicate "moxie_add_operand"
>>> +  (match_code "const_int,reg")
>>> +{
>>> +  if ((GET_CODE (op) == CONST_INT
>>> +       && INTVAL (op) >= -255
>>> +       && INTVAL (op) <= 255)
>>> +      || (REG_P (op)))
>>> +    return 1;
>>> +  else
>>> +    return 0;
>>> +})
>>
>> This actually returns false for all registers.  You want
>
> No, he just has an extra pair of parentheses around REG_P.  I do prefer  
> your version though, or
>
>  (ior (match_code "reg")
>       (and (match_code "const_int")
>            (match_test "INTVAL (op) >= -255 && INTVAL (op) <= 255)))

(match_test "IN_RANGE (ival, -255, 255)")
?

        Jakub

<Prev in Thread] Current Thread [Next in Thread>