summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJonas Haag <jonas@lophus.org>2016-01-15 18:51:06 +0100
committerPhilipp Serrer <philipp@serrer.de>2018-01-18 18:08:16 +0100
commit5b11f14f77192ac0f70c0ca4bdd19ab874263fbf (patch)
tree581549ccf6a44b9012778336ba9cef59e2622051
parent4bea36807dad3209a09c2d365d23a14b20362dac (diff)
sparc: fix prologue generation
-rw-r--r--ir/be/sparc/sparc_finish.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ir/be/sparc/sparc_finish.c b/ir/be/sparc/sparc_finish.c
index ba176fe..a94b186 100644
--- a/ir/be/sparc/sparc_finish.c
+++ b/ir/be/sparc/sparc_finish.c
@@ -102,9 +102,13 @@ static void sparc_introduce_prolog_epilog(ir_graph *irg, bool omit_fp)
unsigned frame_size = get_type_size(frame_type);
/* introduce epilog for every return node */
- foreach_irn_in(get_irg_end_block(irg), i, ret) {
- assert(is_sparc_Return(ret));
- introduce_epilog(ret, omit_fp);
+ foreach_irn_in(get_irg_end_block(irg), i, pred) {
+ if (is_x_except_branch(pred)) {
+ /* Don't generate any code for X_except ins */
+ } else {
+ assert(is_sparc_Return(pred));
+ introduce_epilog(pred, omit_fp);
+ }
}
if (!omit_fp) {