OSDN Git Service

* genrecog.c (*): Rename _last_insn to last_insn.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Apr 2000 07:16:59 +0000 (07:16 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Apr 2000 07:16:59 +0000 (07:16 +0000)
        (make_insn_sequence): Set the position of the peephole2 C test
        to be at the last insn.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32990 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/genrecog.c

index 11c7e96..9db4481 100644 (file)
@@ -1,5 +1,11 @@
 2000-04-06  Richard Henderson  <rth@cygnus.com>
 
+       * genrecog.c (*): Rename _last_insn to last_insn.
+       (make_insn_sequence): Set the position of the peephole2 C test
+       to be at the last insn.
+
+2000-04-06  Richard Henderson  <rth@cygnus.com>
+
        * flow.c (compute_flow_dominators): Free worklist.
 
 2000-04-06  Michael Matz  <matzmich@cs.tu-berlin.de>
@@ -181,11 +187,11 @@ Thu Apr  6 19:11:47 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
 
 2000-04-05   Benjamin Kosnik  <bkoz@cygnus.com>
 
-        * configure.in: And here.
-        * configure: Regenerate.
-        * acconfig.h: Add ENABLE_STD_NAMESPACE to set flag_honor_std if
-        --enable-libstdcxx-v3 is passed at configure time.
-        * config.h.in: Regenerate.
+       * configure.in: And here.
+       * configure: Regenerate.
+       * acconfig.h: Add ENABLE_STD_NAMESPACE to set flag_honor_std if
+       --enable-libstdcxx-v3 is passed at configure time.
+       * config.h.in: Regenerate.
 
 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
 
@@ -231,7 +237,7 @@ Wed Apr  5 12:35:18 2000  Hans-Peter Nilsson  <hp@axis.com>
        all (op (minus A B) 0) with (op A B).
 
 Wed Apr  5 18:03:31 2000  Toshiyasu Morita  (toshi.morita@sega.com)
-                          J"orn Rennecke <amylaar@cygnus.co.uk>
+                         J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * sh.c (block_lump_real_i4): Add missing clobber of T_REG
        (block_lump_real): Likewise.
index 9ad2ba2..c86b62a 100644 (file)
@@ -1607,9 +1607,9 @@ change_state (oldpos, newpos, afterward, indent)
     if (newpos[new_has_insn] >= 'A' && newpos[new_has_insn] <= 'Z')
       break;
 
-  /* Make sure to reset the _last_insn pointer when popping back up.  */
+  /* Make sure to reset the last_insn pointer when popping back up.  */
   if (old_has_insn >= 0 && new_has_insn < 0)
-    printf ("%s_last_insn = insn;\n", indent);
+    printf ("%slast_insn = insn;\n", indent);
 
   /* Go down to desired level.  */
   while (depth < ndepth)
@@ -1620,7 +1620,7 @@ change_state (oldpos, newpos, afterward, indent)
          /* We can only fail if we're moving down the tree.  */
          if (old_has_insn >= 0 && oldpos[old_has_insn] >= newpos[depth])
            {
-             printf ("%s_last_insn = recog_next_insn (insn, %d);\n", 
+             printf ("%slast_insn = recog_next_insn (insn, %d);\n", 
                      indent, newpos[depth] - 'A');
            }
          else
@@ -1632,9 +1632,9 @@ change_state (oldpos, newpos, afterward, indent)
                printf ("%s  goto L%d;\n", indent, afterward->number);
              else
                printf ("%s  goto ret0;\n", indent);
-             printf ("%s_last_insn = tem;\n", indent);
+             printf ("%slast_insn = tem;\n", indent);
            }
-         printf ("%sx%d = PATTERN (_last_insn);\n", indent, depth + 1);
+         printf ("%sx%d = PATTERN (last_insn);\n", indent, depth + 1);
        }
       else if (newpos[depth] >= 'a' && newpos[depth] <= 'z')
        printf ("%sx%d = XVECEXP (x%d, 0, %d);\n",
@@ -2210,7 +2210,7 @@ peephole2%s (x0, insn, _plast_insn)\n\
     printf ("  register rtx x%d ATTRIBUTE_UNUSED;\n", i);
 
   if (type == PEEPHOLE2)
-    printf ("  register rtx _last_insn = insn;\n");
+    printf ("  register rtx last_insn = insn;\n");
   printf ("  %s tem ATTRIBUTE_UNUSED;\n", IS_SPLIT (type) ? "rtx" : "int");
 
   if (head->first)
@@ -2219,7 +2219,7 @@ peephole2%s (x0, insn, _plast_insn)\n\
     printf ("  goto ret0;\n");
 
   if (type == PEEPHOLE2)
-    printf (" ret1:\n  *_plast_insn = _last_insn;\n  return tem;\n");
+    printf (" ret1:\n  *_plast_insn = last_insn;\n  return tem;\n");
   printf (" ret0:\n  return %d;\n}\n\n", IS_SPLIT (type) ? 0 : -1);
 }
 
@@ -2310,6 +2310,7 @@ make_insn_sequence (insn, type)
   struct decision *last;
   struct decision_test *test, **place;
   struct decision_head head;
+  char *c_test_pos = "";
 
   record_insn_name (next_insn_code, (type == RECOG ? XSTR (insn, 0) : NULL));
 
@@ -2334,6 +2335,10 @@ make_insn_sequence (insn, type)
            }
        }
       XVECLEN (x, 0) = j;
+
+      c_test_pos = alloca (2);
+      c_test_pos[0] = 'A' + j - 1;
+      c_test_pos[1] = '\0';
     }
   else if (XVECLEN (insn, type == RECOG) == 1)
     x = XVECEXP (insn, type == RECOG, 0);
@@ -2359,7 +2364,7 @@ make_insn_sequence (insn, type)
       /* Need a new node if we have another test to add.  */
       if (test->type == DT_accept_op)
        {
-         last = new_decision ("", &last->success);
+         last = new_decision (c_test_pos, &last->success);
          place = &last->tests;
        }
       test = new_decision_test (DT_c_test, &place);