aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-12-12 09:23:52 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-12-12 04:23:52 -0500
commit100d81d443fd03ca6450907bf3eaa559b66a4801 (patch)
tree9c6a50ecaa05e76d829f19893062e3aebb202097 /gcc/except.c
parentcba734eaca0f49feea8b004ee28646f2b1ca16a5 (diff)
downloadgcc-100d81d443fd03ca6450907bf3eaa559b66a4801.zip
gcc-100d81d443fd03ca6450907bf3eaa559b66a4801.tar.gz
gcc-100d81d443fd03ca6450907bf3eaa559b66a4801.tar.bz2
except.c (call_get_eh_context): Don't mess with sequences.
* except.c (call_get_eh_context): Don't mess with sequences. (emit_eh_context): Include the call in the sequence here. From-SVN: r17070
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 95f8b2c..dbba31b 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -707,15 +707,13 @@ add_partial_entry (handler)
pop_obstacks ();
}
-/* Emit code to get EH context to current function. Should only be used
- by emit_eh_context. */
+/* Emit code to get EH context to current function. */
static rtx
call_get_eh_context ()
{
static tree fn;
tree expr;
- rtx ehc, reg, insns;
if (fn == NULL_TREE)
{
@@ -741,16 +739,7 @@ call_get_eh_context ()
expr, NULL_TREE, NULL_TREE);
TREE_SIDE_EFFECTS (expr) = 1;
- start_sequence ();
- ehc = expand_expr (expr, NULL_RTX, VOIDmode, 0);
- reg = copy_to_reg (ehc);
-
- insns = get_insns ();
- end_sequence ();
-
- emit_insns_before (insns, get_first_nonparm_insn ());
-
- return reg;
+ return copy_to_reg (expand_expr (expr, NULL_RTX, VOIDmode, 0));
}
/* Get a reference to the EH context.
@@ -1678,11 +1667,12 @@ emit_eh_context ()
{
rtx insns;
- /* If this is the first use insn, emit the call. */
+ start_sequence ();
+
+ /* If this is the first use insn, emit the call here. */
if (ehc == 0)
ehc = call_get_eh_context ();
- start_sequence ();
emit_move_insn (XEXP (reg, 0), ehc);
insns = get_insns ();
end_sequence ();