}
}
+typedef struct {
+ be_abi_call_flags_bits_t flags;
+ const arch_isa_t *isa;
+ const arch_env_t *aenv;
+ ir_graph *irg;
+} ia32_abi_env_t;
+
+static void *ia32_abi_init(const be_abi_call_t *call, const arch_env_t *aenv, ir_graph *irg)
+{
+ ia32_abi_env_t *env = xmalloc(sizeof(env[0]));
+ be_abi_call_flags_t fl = be_abi_call_get_flags(call);
+ env->flags = fl.bits;
+ env->irg = irg;
+ env->aenv = aenv;
+ env->isa = aenv->isa;
+ return env;
+}
+
static entity *ia32_get_frame_entity(const void *self, const ir_node *irn) {
return is_ia32_irn(irn) ? get_ia32_frame_ent(irn) : NULL;
}
* address, so fix this here
*/
if(is_ia32_Pop(irn)) {
- bias -= 4;
+ ia32_abi_env_t *cb_env = get_abi_cb(ops->cg->birg->abi);
+ if (cb_env->flags.try_omit_fp)
+ bias -= 4;
}
DBG((ops->cg->mod, LEVEL_1, "stack biased %+F with %d\n", irn, bias));
return 0;
}
-typedef struct {
- be_abi_call_flags_bits_t flags;
- const arch_isa_t *isa;
- const arch_env_t *aenv;
- ir_graph *irg;
-} ia32_abi_env_t;
-
-static void *ia32_abi_init(const be_abi_call_t *call, const arch_env_t *aenv, ir_graph *irg)
-{
- ia32_abi_env_t *env = xmalloc(sizeof(env[0]));
- be_abi_call_flags_t fl = be_abi_call_get_flags(call);
- env->flags = fl.bits;
- env->irg = irg;
- env->aenv = aenv;
- env->isa = aenv->isa;
- return env;
-}
-
/**
* Put all registers which are saved by the prologue/epilogue in a set.
*