From 5c7a310f81ad5609a1830d4d156ef90f3a35d764 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Thu, 29 Apr 1999 23:01:29 +0000 Subject: emit-rtl.c (start_sequence): Expand comments. * emit-rtl.c (start_sequence): Expand comments. (start_sequence_for_rtl_expr): Likewise. (push_to_sequence): Likewise. (end_sequence): Likewise. * expr.c (inhibit_defer_pop): Likewise. * expr.h (inhibit_defer_pop): Likewise. (NO_DEFER_POP): Likewise. (OK_DEFER_POP): Likewise. From-SVN: r26704 --- gcc/emit-rtl.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'gcc/emit-rtl.c') diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index b1e2d3d..2aa51ac 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3284,7 +3284,13 @@ emit (x) abort (); } -/* Begin emitting insns to a sequence which can be packaged in an RTL_EXPR. */ +/* Begin emitting insns to a sequence which can be packaged in an + RTL_EXPR. If this sequence will contain something that might cause + the compiler to pop arguments to function calls (because those + pops have previously been deferred; see INHIBIT_DEFER_POP for more + details), use do_pending_stack_adjust before calling this function. + That will ensure that the deferred pops are not accidentally + emitted in the middel of this sequence. */ void start_sequence () @@ -3311,8 +3317,9 @@ start_sequence () last_insn = 0; } -/* Similarly, but indicate that this sequence will be placed in - T, an RTL_EXPR. */ +/* Similarly, but indicate that this sequence will be placed in T, an + RTL_EXPR. See the documentation for start_sequence for more + information about how to use this function. */ void start_sequence_for_rtl_expr (t) @@ -3323,8 +3330,9 @@ start_sequence_for_rtl_expr (t) sequence_rtl_expr = t; } -/* Set up the insn chain starting with FIRST - as the current sequence, saving the previously current one. */ +/* Set up the insn chain starting with FIRST as the current sequence, + saving the previously current one. See the documentation for + start_sequence for more information about how to use this function. */ void push_to_sequence (first) @@ -3378,8 +3386,16 @@ pop_topmost_sequence () /* After emitting to a sequence, restore previous saved state. - To get the contents of the sequence just made, - you must call `gen_sequence' *before* calling here. */ + To get the contents of the sequence just made, you must call + `gen_sequence' *before* calling here. + + If the compiler might have deferred popping arguments while + generating this sequence, and this sequence will not be immediately + inserted into the instruction stream, use do_pending_stack_adjust + before calling gen_sequence. That will ensure that the deferred + pops are inserted into this sequence, and not into some random + location in the instruction stream. See INHIBIT_DEFER_POP for more + information about deferred popping of arguments. */ void end_sequence () -- cgit v1.1