From 62e77ea88b6ff825b23b843317a0208c2f9a903b Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 20 Sep 2006 08:35:01 +0000 Subject: [PATCH] be_abi_omit_fp() added clear the abi callback environment after done for safety --- ir/be/beabi.c | 9 +++++++++ ir/be/beabi.h | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/ir/be/beabi.c b/ir/be/beabi.c index 3d28942a7..bb4b42dcb 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -1799,6 +1799,7 @@ be_abi_irg_t *be_abi_introduce(be_irg_t *birg) arch_env_push_irn_handler(env->birg->main_env->arch_env, &env->irn_handler); env->call->cb->done(env->cb); + env->cb = NULL; return env; } @@ -2079,3 +2080,11 @@ static const arch_irn_ops_if_t abi_irn_ops = { static const arch_irn_handler_t abi_irn_handler = { abi_get_irn_ops }; + +/** + * Returns non-zero if the ABI has omitted the frame pointer in + * the current graph. + */ +int be_abi_omit_fp(const be_abi_irg_t *abi) { + return abi->call->flags.bits.try_omit_fp; +} diff --git a/ir/be/beabi.h b/ir/be/beabi.h index e364bedfc..8a8e86861 100644 --- a/ir/be/beabi.h +++ b/ir/be/beabi.h @@ -155,4 +155,10 @@ struct _be_stack_layout_t { */ const be_stack_layout_t *be_abi_get_stack_layout(const be_abi_irg_t *abi); +/** + * Returns non-zero if the ABI has omitted the frame pointer in + * the current graph. + */ +int be_abi_omit_fp(const be_abi_irg_t *abi); + #endif /* _BEABI_H */ -- 2.20.1