X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2FTEMPLATE%2Fbearch_TEMPLATE.c;h=d988b36af3fe67189338feb5545c746e1d3541b8;hb=df2faee01a5832057bb3ca0ba5f67e979c916e19;hp=6ed44f4cfd18d064a8524820c691aefc1bac6b60;hpb=969583510d3435f99edab463835f68a9ccd2bcc8;p=libfirm diff --git a/ir/be/TEMPLATE/bearch_TEMPLATE.c b/ir/be/TEMPLATE/bearch_TEMPLATE.c index 6ed44f4cf..d988b36af 100644 --- a/ir/be/TEMPLATE/bearch_TEMPLATE.c +++ b/ir/be/TEMPLATE/bearch_TEMPLATE.c @@ -36,7 +36,7 @@ #include "bitset.h" #include "debug.h" -#include "be.h" +#include "be_t.h" #include "bearch.h" #include "benode.h" #include "belower.h" @@ -85,7 +85,6 @@ static const arch_irn_ops_t TEMPLATE_irn_ops = { TEMPLATE_get_frame_entity, TEMPLATE_set_frame_offset, TEMPLATE_get_sp_bias, - NULL, /* get_inverse */ NULL, /* get_op_estimated_cost */ NULL, /* possible_memory_operand */ NULL, /* perform_memory_operand */ @@ -140,10 +139,9 @@ static TEMPLATE_isa_t TEMPLATE_isa_template = { &TEMPLATE_registers[REG_SP], /* stack pointer register */ &TEMPLATE_registers[REG_BP], /* base pointer register */ 2, /* power of two stack alignment for calls, 2^2 == 4 */ - NULL, /* main environment */ 7, /* costs for a spill instruction */ 5, /* costs for a reload instruction */ - true, /* no custom abi handling */ + true, /* custom abi handling */ }, }; @@ -158,14 +156,11 @@ static void TEMPLATE_finish(void) TEMPLATE_free_opcodes(); } -static arch_env_t *TEMPLATE_begin_codegeneration(const be_main_env_t *env) +static arch_env_t *TEMPLATE_begin_codegeneration(void) { TEMPLATE_isa_t *isa = XMALLOC(TEMPLATE_isa_t); *isa = TEMPLATE_isa_template; - be_emit_init(env->file_handle); - be_gas_begin_compilation_unit(env); - return &isa->base; } @@ -174,12 +169,6 @@ static arch_env_t *TEMPLATE_begin_codegeneration(const be_main_env_t *env) */ static void TEMPLATE_end_codegeneration(void *self) { - TEMPLATE_isa_t *isa = (TEMPLATE_isa_t*)self; - - /* emit now all global declarations */ - be_gas_end_compilation_unit(isa->base.main_env); - - be_emit_exit(); free(self); }