bescripts: Copy all common node attributes into the constructor variants.
[libfirm] / ir / be / TEMPLATE / bearch_TEMPLATE.c
index 6ed44f4..d988b36 100644 (file)
@@ -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);
 }