diff gcc/config/alpha/predicates.md @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents 3bfb6c00c1e0
children b7f97abdc517
line wrap: on
line diff
--- a/gcc/config/alpha/predicates.md	Sun Feb 07 18:28:00 2010 +0900
+++ b/gcc/config/alpha/predicates.md	Fri Feb 12 23:39:51 2010 +0900
@@ -112,7 +112,7 @@
 (define_predicate "mode_mask_operand"
   (match_code "const_int,const_double")
 {
-  if (GET_CODE (op) == CONST_INT)
+  if (CONST_INT_P (op))
     {
       HOST_WIDE_INT value = INTVAL (op);
 
@@ -326,7 +326,7 @@
 {
   if (GET_CODE (op) == CONST
       && GET_CODE (XEXP (op, 0)) == PLUS
-      && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
+      && CONST_INT_P (XEXP (XEXP (op, 0), 1)))
     op = XEXP (XEXP (op, 0), 0);
 
   if (GET_CODE (op) == LABEL_REF)
@@ -350,7 +350,7 @@
 
   if (GET_CODE (op) == CONST
       && GET_CODE (XEXP (op, 0)) == PLUS
-      && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
+      && CONST_INT_P (XEXP (XEXP (op, 0), 1)))
     op = XEXP (XEXP (op, 0), 0);
 
   if (GET_CODE (op) != SYMBOL_REF)
@@ -374,7 +374,7 @@
 {
   if (GET_CODE (op) == CONST
       && GET_CODE (XEXP (op, 0)) == PLUS
-      && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
+      && CONST_INT_P (XEXP (XEXP (op, 0), 1)))
     op = XEXP (XEXP (op, 0), 0);
 
   if (GET_CODE (op) != SYMBOL_REF)
@@ -392,7 +392,7 @@
 	    (match_test "GET_CODE (XEXP (op,0)) == PLUS
 			 && (GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF
 			     || GET_CODE (XEXP (XEXP (op,0), 0)) == LABEL_REF)
-			 && GET_CODE (XEXP (XEXP (op,0), 1)) == CONST_INT"))))
+			 && CONST_INT_P (XEXP (XEXP (op,0), 1))"))))
 
 ;; Return true if OP is valid for 16-bit DTP relative relocations.
 (define_predicate "dtp16_symbolic_operand"
@@ -439,11 +439,9 @@
        (match_code "mem"))
 {
   rtx base;
-  int offset;
 
   if (MEM_ALIGN (op) >= 32)
     return 1;
-
   op = XEXP (op, 0);
 
   /* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo)
@@ -451,30 +449,15 @@
   if (reload_in_progress
       && GET_CODE (op) == PLUS
       && GET_CODE (XEXP (op, 0)) == PLUS)
-    {
-      base = XEXP (XEXP (op, 0), 0);
-      offset = INTVAL (XEXP (op, 1));
-    }
+    base = XEXP (XEXP (op, 0), 0);
   else
     {
       if (! memory_address_p (mode, op))
 	return 0;
-      if (GET_CODE (op) == PLUS)
-	{
-	  base = XEXP (op, 0);
-	  offset = INTVAL (XEXP (op, 1));
-	}
-      else
-	{
-	  base = op;
-	  offset = 0;
-	}
+      base = (GET_CODE (op) == PLUS ? XEXP (op, 0) : op);
     }
 
-  if (offset % GET_MODE_SIZE (mode))
-    return 0;
-
-  return (GET_CODE (base) == REG && REGNO_POINTER_ALIGN (REGNO (base)) >= 32);
+  return (REG_P (base) && REGNO_POINTER_ALIGN (REGNO (base)) >= 32);
 })
 
 ;; Similar, but return 1 if OP is a MEM which is not alignable.
@@ -484,11 +467,9 @@
        (match_code "mem"))
 {
   rtx base;
-  int offset;
 
   if (MEM_ALIGN (op) >= 32)
     return 0;
-
   op = XEXP (op, 0);
 
   /* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo)
@@ -496,30 +477,15 @@
   if (reload_in_progress
       && GET_CODE (op) == PLUS
       && GET_CODE (XEXP (op, 0)) == PLUS)
-    {
-      base = XEXP (XEXP (op, 0), 0);
-      offset = INTVAL (XEXP (op, 1));
-    }
+    base = XEXP (XEXP (op, 0), 0);
   else
     {
       if (! memory_address_p (mode, op))
 	return 0;
-      if (GET_CODE (op) == PLUS)
-	{
-	  base = XEXP (op, 0);
-	  offset = INTVAL (XEXP (op, 1));
-	}
-      else
-	{
-	  base = op;
-	  offset = 0;
-	}
+      base = (GET_CODE (op) == PLUS ? XEXP (op, 0) : op);
     }
 
-  if (offset % GET_MODE_SIZE (mode))
-    return 1;
-
-  return (GET_CODE (base) == REG && REGNO_POINTER_ALIGN (REGNO (base)) < 32);
+  return (REG_P (base) && REGNO_POINTER_ALIGN (REGNO (base)) < 32);
 })
 
 ;; Return 1 if OP is any memory location.  During reload a pseudo matches.
@@ -577,6 +543,12 @@
   (and (match_code "reg")
        (match_operand 0 "register_operand")))
 
+;; Return 1 if OP is a valid Alpha comparison operator for "cbranch"
+;; instructions.
+(define_predicate "alpha_cbranch_operator"
+  (ior (match_operand 0 "ordered_comparison_operator")
+       (match_code "ordered,unordered")))
+
 ;; Return 1 if OP is a valid Alpha comparison operator for "cmp" style
 ;; instructions.
 (define_predicate "alpha_comparison_operator"