aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-10-23 02:18:53 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-10-22 22:18:53 -0400
commitfdc46fbe659f77dbcf016a5afb8d08652801c52b (patch)
tree83545746e3ad14e4a0e2b45f443e0abcddba6ee8 /gcc/expr.c
parent5581627cef0a73759464baf4a13c6158da3622af (diff)
downloadgcc-fdc46fbe659f77dbcf016a5afb8d08652801c52b.zip
gcc-fdc46fbe659f77dbcf016a5afb8d08652801c52b.tar.gz
gcc-fdc46fbe659f77dbcf016a5afb8d08652801c52b.tar.bz2
expr.c (pending_chain): Move up.
* expr.c (pending_chain): Move up. (save_expr_status): Do save pending_chain. (restore_expr_status): And restore it. * function.h (struct function): Add pending_chain. From-SVN: r23241
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 9a42b43..37581ec 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -114,6 +114,9 @@ static int can_handle_constant_p;
infinite recursion. */
static int in_check_memory_usage;
+/* Postincrements that still need to be expanded. */
+static rtx pending_chain;
+
/* This structure is used by move_by_pieces to describe the move to
be performed. */
struct move_by_pieces
@@ -342,15 +345,14 @@ void
save_expr_status (p)
struct function *p;
{
- /* Instead of saving the postincrement queue, empty it. */
- emit_queue ();
-
+ p->pending_chain = pending_chain;
p->pending_stack_adjust = pending_stack_adjust;
p->inhibit_defer_pop = inhibit_defer_pop;
p->saveregs_value = saveregs_value;
p->apply_args_value = apply_args_value;
p->forced_labels = forced_labels;
+ pending_chain = NULL_RTX;
pending_stack_adjust = 0;
inhibit_defer_pop = 0;
saveregs_value = 0;
@@ -365,6 +367,7 @@ void
restore_expr_status (p)
struct function *p;
{
+ pending_chain = p->pending_chain;
pending_stack_adjust = p->pending_stack_adjust;
inhibit_defer_pop = p->inhibit_defer_pop;
saveregs_value = p->saveregs_value;
@@ -375,8 +378,6 @@ restore_expr_status (p)
/* Manage the queue of increment instructions to be output
for POSTINCREMENT_EXPR expressions, etc. */
-static rtx pending_chain;
-
/* Queue up to increment (or change) VAR later. BODY says how:
BODY should be the same thing you would pass to emit_insn
to increment right away. It will go to emit_insn later on.