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: [Ping] [PATCH, 5/10] aarch64: add ccmp operand predicate


Thanks for the comments. All comments are accepted and the updated patch is
attached.

-Zhenqiang

> -----Original Message-----
> From: Richard Henderson [mailto:rth@redhat.com]
> Sent: Saturday, October 11, 2014 11:22 PM
> To: Zhenqiang Chen; gcc-patches@gcc.gnu.org
> Subject: Re: [Ping] [PATCH, 5/10] aarch64: add ccmp operand predicate
> 
> On 09/22/2014 11:44 PM, Zhenqiang Chen wrote:
> > +/* Return true if val can be encoded as a 5-bit unsigned immediate.
> > +*/ bool
> > +aarch64_uimm5 (HOST_WIDE_INT val)
> > +{
> > +  return (val & (HOST_WIDE_INT) 0x1f) == val; }
> 
> This is just silly.
> 
> > +(define_constraint "Usn"
> > + "A constant that can be used with a CCMN operation (once negated)."
> > + (and (match_code "const_int")
> > +      (match_test "aarch64_uimm5 (-ival)")))
> 
> (match_test "IN_RANGE (ival, -31, 0)")
> 
> > +(define_predicate "aarch64_ccmp_immediate"
> > +  (and (match_code "const_int")
> > +       (ior (match_test "aarch64_uimm5 (INTVAL (op))")
> > +	    (match_test "aarch64_uimm5 (-INTVAL (op))"))))
> 
> (and (match_code "const_int")
>      (match_test "IN_RANGE (INTVAL (op), -31, 31)"))
> 
> 
> r~

Attachment: 5-ccmp-operants.patch
Description: Binary data


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