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: new port: Moxie


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


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