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 Fri, 2009-06-05 at 00:04 +0200, Jakub Jelinek wrote:
> 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

Thanks guys... Here's the latest version of the port.

Diff from previous version here:
http://github.com/atgreen/moxiedev/commit/a06a5e8eee665acd5dc7d952ca497758bdeb8a7e

Ok to commit?

AG

Attachment: moxie-gcc-8.patch.txt.gz
Description: GNU Zip compressed data


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