(push_topmost_sequence, pop_topmost_sequence): New
authorTom Wood <wood@gnu.org>
Tue, 23 Mar 1993 12:52:39 +0000 (12:52 +0000)
committerTom Wood <wood@gnu.org>
Tue, 23 Mar 1993 12:52:39 +0000 (12:52 +0000)
functions.

From-SVN: r3841

gcc/emit-rtl.c

index 31c6d39f0bef9faf93665bfe69e21532b514995f..47216629de1219ddab035412be7c0ad90166ad5a 100644 (file)
@@ -2614,6 +2614,40 @@ push_to_sequence (first)
   last_insn = last;
 }
 
+/* Set up the outer-level insn chain
+   as the current sequence, saving the previously current one.  */
+
+void
+push_topmost_sequence ()
+{
+  struct sequence_stack *stack, *top;
+
+  start_sequence ();
+
+  for (stack = sequence_stack; stack; stack = stack->next)
+    top = stack;
+
+  first_insn = top->first;
+  last_insn = top->last;
+}
+
+/* After emitting to the outer-level insn chain, update the outer-level
+   insn chain, and restore the previous saved state.  */
+
+void
+pop_topmost_sequence ()
+{
+  struct sequence_stack *stack, *top;
+
+  for (stack = sequence_stack; stack; stack = stack->next)
+    top = stack;
+
+  top->first = first_insn;
+  top->last = last_insn;
+
+  end_sequence ();
+}
+
 /* After emitting to a sequence, restore previous saved state.
 
    To get the contents of the sequence just made,