Commit b4bdc4fe authored by Matthias Braun's avatar Matthias Braun
Browse files

allow backend to do its own custom abi handling and disable the generic beabi.h/.c stuff

[r27725]
parent 6d0764bb
......@@ -203,6 +203,7 @@ static TEMPLATE_isa_t TEMPLATE_isa_template = {
NULL, /* main environment */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
false, /* no custom abi handling */
},
};
......
......@@ -322,6 +322,7 @@ static amd64_isa_t amd64_isa_template = {
NULL, /* main environment */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
false, /* no custom abi handling */
},
};
......
......@@ -667,6 +667,7 @@ static arm_isa_t arm_isa_template = {
NULL, /* main environment */
7, /* spill costs */
5, /* reload costs */
false, /* no custom abi handling */
},
0, /* use generic register names instead of SP, LR, PC */
ARM_FPU_ARCH_FPE, /* FPU architecture */
......
......@@ -2279,6 +2279,13 @@ be_abi_irg_t *be_abi_introduce(ir_graph *irg)
sp_req->type |= arch_register_req_type_ignore;
}
/* break here if backend provides a custom API.
* Note: we shouldn't have to setup any be_abi_irg_t* stuff at all,
* but need more cleanup to make this work
*/
if (arch_env->custom_abi)
return env;
env->init_sp = dummy = new_r_Dummy(irg, arch_env->sp->reg_class->mode);
env->calls = NEW_ARR_F(ir_node*, 0);
......
......@@ -750,6 +750,9 @@ struct arch_env_t {
const be_main_env_t *main_env; /**< the be main environment */
int spill_cost; /**< cost for a be_Spill node */
int reload_cost; /**< cost for a be_Reload node */
bool custom_abi : 1; /**< backend does all abi handling
and does not need the generic stuff
from beabi.h/.c */
};
static inline unsigned arch_irn_get_n_outs(const ir_node *node)
......
......@@ -1541,6 +1541,7 @@ static ia32_isa_t ia32_isa_template = {
NULL, /* main environment */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
false, /* no custom abi handling */
},
NULL, /* 16bit register names */
NULL, /* 8bit register names */
......
......@@ -341,6 +341,7 @@ static sparc_isa_t sparc_isa_template = {
NULL, /* main environment */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
false, /* no custom abi handling */
},
NULL /* current code generator */
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment