OSDN Git Service

* expr.c (expand_expr): Use gen_int_mode for the argument
[pf3gnuchains/gcc-fork.git] / gcc / genattrtab.c
index bbc5a45..0270945 100644 (file)
@@ -100,8 +100,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define ATTR_PERMANENT_P(RTX) (RTX_FLAG((RTX), integrated))
 #define ATTR_EQ_ATTR_P(RTX) (RTX_FLAG((RTX), volatil))
 
-#include "hconfig.h"
+#include "bconfig.h"
 #include "system.h"
+#include "coretypes.h"
+#include "tm.h"
 #include "rtl.h"
 #include "ggc.h"
 #include "gensupport.h"
@@ -1159,6 +1161,10 @@ check_attr_value (exp, attr)
       break;
 
     case FFS:
+    case CLZ:
+    case CTZ:
+    case POPCOUNT:
+    case PARITY:
       XEXP (exp, 0) = check_attr_value (XEXP (exp, 0), attr);
       break;
 
@@ -1838,7 +1844,7 @@ operate_exp (op, left, right)
    The first produces a function `function_units_used' which is given an
    insn and produces an encoding showing which function units are required
    for the execution of that insn.  If the value is non-negative, the insn
-   uses that unit; otherwise, the value is a one's compliment mask of units
+   uses that unit; otherwise, the value is a one's complement mask of units
    used.
 
    The second produces a function `result_ready_cost' which is used to
@@ -2083,7 +2089,7 @@ expand_units ()
             every possible C.
 
             The issue delay function for C is op->issue_exp and is used to
-            write the `<name>_unit_conflict_cost' function.  Symbolicly
+            write the `<name>_unit_conflict_cost' function.  Symbolically
             this is "ISSUE-DELAY (E,C)".
 
             The pipeline delay results form the FIFO constraint on the
@@ -2246,7 +2252,7 @@ simplify_knowing (exp, known_true)
 /* Translate the CONST_STRING expressions in X to change the encoding of
    value.  On input, the value is a bitmask with a one bit for each unit
    used; on output, the value is the unit number (zero based) if one
-   and only one unit is used or the one's compliment of the bitmask.  */
+   and only one unit is used or the one's complement of the bitmask.  */
 
 static rtx
 encode_units_mask (x)
@@ -2264,7 +2270,7 @@ encode_units_mask (x)
     case CONST_STRING:
       i = atoi (XSTR (x, 0));
       if (i < 0)
-       /* The sign bit encodes a one's compliment mask.  */
+       /* The sign bit encodes a one's complement mask.  */
        abort ();
       else if (i != 0 && i == (i & -i))
        /* Only one bit is set, so yield that unit number.  */
@@ -2562,11 +2568,10 @@ simplify_cond (exp, insn_code, insn_index)
   int len = XVECLEN (exp, 0);
   rtx *tests = (rtx *) xmalloc (len * sizeof (rtx));
   int allsame = 1;
-  char *first_spacer;
   rtx ret;
 
   /* This lets us free all storage allocated below, if appropriate.  */
-  first_spacer = (char *) obstack_finish (rtl_obstack);
+  obstack_finish (rtl_obstack);
 
   memcpy (tests, XVEC (exp, 0)->elem, len * sizeof (rtx));
 
@@ -3197,8 +3202,8 @@ attr_rtx_cost (x)
 \f
 
 /* Simplify test expression and use temporary obstack in order to avoid
-   memory bloat.  Use ATTR_IND_SIMPLIFIED to avoid unnecesary simplifications
-   and avoid unnecesary copying if possible.  */
+   memory bloat.  Use ATTR_IND_SIMPLIFIED to avoid unnecessary simplifications
+   and avoid unnecessary copying if possible.  */
 
 static rtx
 simplify_test_exp_in_temp (exp, insn_code, insn_index)
@@ -5020,7 +5025,7 @@ write_attr_get (attr)
       return;
     }
 
-  printf ("     rtx insn;\n");
+  printf ("     rtx insn ATTRIBUTE_UNUSED;\n");
   printf ("{\n");
 
   if (GET_CODE (common_av->value) == FFS)
@@ -6114,10 +6119,18 @@ from the machine description file `md'.  */\n\n");
          gen_presence_set (desc);
          break;
          
+       case FINAL_PRESENCE_SET:
+         gen_final_presence_set (desc);
+         break;
+         
        case ABSENCE_SET:
          gen_absence_set (desc);
          break;
          
+       case FINAL_ABSENCE_SET:
+         gen_final_absence_set (desc);
+         break;
+         
        case DEFINE_AUTOMATON:
          gen_automaton (desc);
          break;
@@ -6169,6 +6182,8 @@ from the machine description file `md'.  */\n\n");
 
   printf ("#include \"config.h\"\n");
   printf ("#include \"system.h\"\n");
+  printf ("#include \"coretypes.h\"\n");
+  printf ("#include \"tm.h\"\n");
   printf ("#include \"rtl.h\"\n");
   printf ("#include \"tm_p.h\"\n");
   printf ("#include \"insn-config.h\"\n");
@@ -6226,7 +6241,18 @@ from the machine description file `md'.  */\n\n");
     for (attr = attrs[i]; attr; attr = attr->next)
       {
        if (! attr->is_special && ! attr->is_const)
-         write_attr_get (attr);
+         {
+           int insn_alts_p;
+
+           insn_alts_p
+             = (attr->name [0] == '*'
+                && strcmp (&attr->name [1], INSN_ALTS_FUNC_NAME) == 0);
+           if (insn_alts_p)
+             printf ("\n#if AUTOMATON_ALTS\n");
+           write_attr_get (attr);
+           if (insn_alts_p)
+             printf ("#endif\n\n");
+         }
       }
 
   /* Write out delay eligibility information, if DEFINE_DELAY present.