X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Ffirm%2Fbearch_firm.c;h=a808ad854e85890120338963f0c610ff145e38b6;hb=205396c4f4f5abe7abd6dc2350c8c398a7623afc;hp=2c51f8df8eee32a3d955eca08b46b40bbdce5983;hpb=c086f22114dc14527f8e04a0493142b1e5aa81f3;p=libfirm diff --git a/ir/be/firm/bearch_firm.c b/ir/be/firm/bearch_firm.c index 2c51f8df8..a808ad854 100644 --- a/ir/be/firm/bearch_firm.c +++ b/ir/be/firm/bearch_firm.c @@ -1,4 +1,3 @@ - /** * ISA implementation for Firm IR nodes. */ @@ -6,10 +5,6 @@ #include "config.h" #endif -#ifdef WITH_LIBCORE -#include -#endif - #include "bitset.h" #include "obst.h" @@ -23,7 +18,7 @@ #include "irtools.h" #include "../be_t.h" -#include "../bearch.h" +#include "../bearch_t.h" #include "../besched.h" #include "../beutil.h" #include "../beabi.h" @@ -254,20 +249,17 @@ static void firm_get_call_abi(const void *self, ir_type *method_type, be_abi_cal static const arch_register_req_t firm_std_reg_req = { arch_register_req_type_normal, ®_classes[CLS_DATAB], - NULL, - NULL + 0, + 0 }; static const arch_register_req_t * -firm_get_irn_reg_req(const void *self, - arch_register_req_t *req, const ir_node *irn, int pos) +firm_get_irn_reg_req(const void *self, const ir_node *irn, int pos) { if(is_firm_be_mode(get_irn_mode(irn))) - memcpy(req, &firm_std_reg_req, sizeof(*req)); - else - req = NULL; + return &firm_std_reg_req; - return req; + return NULL; } struct irn_reg_assoc { @@ -362,7 +354,7 @@ static ir_entity *firm_get_frame_entity(const void *self, const ir_node *irn) return NULL; } -static void firm_set_frame_entity(const void *self, const ir_node *irn, ir_entity *ent) +static void firm_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent) { } @@ -572,7 +564,7 @@ static void firm_codegen_done(void *self) free(self); } -static void *firm_cg_init(const be_irg_t *birg); +static void *firm_cg_init(be_irg_t *birg); static const arch_code_generator_if_t firm_code_gen_if = { firm_cg_init, @@ -585,11 +577,11 @@ static const arch_code_generator_if_t firm_code_gen_if = { firm_codegen_done }; -static void *firm_cg_init(const be_irg_t *birg) +static void *firm_cg_init(be_irg_t *birg) { firm_code_gen_t *cg = xmalloc(sizeof(*cg)); cg->impl = &firm_code_gen_if; - cg->irg = birg->irg; + cg->irg = be_get_birg_irg(birg); return cg; } @@ -627,6 +619,13 @@ static const be_machine_t *firm_get_machine(const void *self) { return NULL; } +/** + * Return irp irgs in the desired order. + */ +static ir_graph **firm_get_irg_list(const void *self, ir_graph ***irg_list) { + return NULL; +} + /** * Returns the libFirm configuration parameter for this backend. */ @@ -666,4 +665,5 @@ const arch_isa_if_t firm_isa = { firm_get_libfirm_params, firm_get_allowed_execution_units, firm_get_machine, + firm_get_irg_list, };