summaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-28 06:22:23 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-28 06:22:23 +0000
commit022208375a3750f0b792adcfa8176d7e85e5ef6d (patch)
tree6a3f4acb3012550610fc130ba3daec51f92064a8 /gcc/reg-stack.c
parent98ad18c5b45f0e24a22a159bbb925a96a4064fe3 (diff)
downloadgcc-022208375a3750f0b792adcfa8176d7e85e5ef6d.tar.gz
* flow.c (tidy_fallthru_edges): Don't combine complex edges.
(calculate_global_regs_live): Kill call-clobbered registers across exception edges. * reg-stack.c (convert_regs_1): Kill the entire target stack across non-call exception edges. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40909 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 0e85a5ab922..54c3f086a48 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -2553,10 +2553,15 @@ convert_regs_1 (file, block)
}
}
- /* Care for EH edges specially. The normal return path may return
- a value in st(0), but the EH path will not, and there's no need
- to add popping code to the edge. */
- if (e->flags & (EDGE_EH | EDGE_ABNORMAL_CALL))
+ /* Care for non-call EH edges specially. The normal return path have
+ values in registers. These will be popped en masse by the unwind
+ library. */
+ if ((e->flags & (EDGE_EH | EDGE_ABNORMAL_CALL)) == EDGE_EH)
+ target_stack->top = -1;
+
+ /* Other calls may appear to have values live in st(0), but the
+ abnormal return path will not have actually loaded the values. */
+ else if (e->flags & EDGE_ABNORMAL_CALL)
{
/* Assert that the lifetimes are as we expect -- one value
live at st(0) on the end of the source block, and no