This is the mail archive of the 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: genrecog: warn of unmatchable predicate codes

On Wed, Dec 22, 2004 at 11:31:13PM -0500, DJ Delorie wrote:
> I could probably write a perl script to scan all the .md files for
> such errors and blindly fix them, but who knows what effects that will
> cause.

As it turns out, of the targets that have switched to use
define_predicate: alpha, arm, i386, ia64, and mips, only
i386 has any mistakes.

Fixed thus.


	* config/i386/ (sse_comparison_operator): Fix
	typo in ieee test.
	(arith_or_logical_operator): Downcase codes.

Index: config/i386/
RCS file: /cvs/gcc/gcc/gcc/config/i386/,v
retrieving revision 1.9
diff -u -p -r1.9
--- config/i386/	14 Dec 2004 22:45:28 -0000	1.9
+++ config/i386/	23 Dec 2004 06:12:39 -0000
@@ -717,7 +717,7 @@
 (define_special_predicate "sse_comparison_operator"
   (ior (match_code "eq,lt,le,unordered,ne,unge,ungt,ordered")
        (and (match_code "uneq,unlt,unle,ltgt,ge,gt")
-	    (match_code "!TARGET_IEEE_FP"))))
+	    (match_test "!TARGET_IEEE_FP"))))
 ;; Return 1 if OP is a valid comparison operator in valid mode.
 (define_predicate "ix86_comparison_operator"
@@ -805,8 +805,8 @@
 ;; Return true for ARITHMETIC_P.
 (define_predicate "arith_or_logical_operator"
+  (match_code "plus,mult,and,ior,xor,smin,smax,umin,umax,compare,minus,div,
+	       mod,udiv,umod,ashift,rotate,ashiftrt,lshiftrt,rotatert"))
 ;; Return 1 if OP is a binary operator that can be promoted to wider mode.
 ;; Modern CPUs have same latency for HImode and SImode multiply,

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