/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
7, /* spill costs */
5, /* reload costs */
},
- NULL_EMITTER, /* emitter environment */
NULL, /* cg */
};
isa = xcalloc(1, sizeof(isa[0]));
memcpy(isa, &mips_isa_template, sizeof(isa[0]));
- be_emit_init_env(&isa->emit, file_handle);
+ be_emit_init(file_handle);
mips_register_init();
mips_create_opcodes();
{
mips_isa_t *isa = self;
- be_gas_emit_decls(&isa->emit, isa->arch_isa.main_env, 1);
+ be_gas_emit_decls(isa->arch_isa.main_env, 1);
- be_emit_destroy_env(&isa->emit);
+ be_emit_exit();
free(isa);
}
-static int mips_get_n_reg_class(const void *self)
+static unsigned mips_get_n_reg_class(const void *self)
{
(void) self;
return N_CLASSES;
}
-static const arch_register_class_t *mips_get_reg_class(const void *self, int i)
+static const arch_register_class_t *mips_get_reg_class(const void *self,
+ unsigned i)
{
(void) self;
- assert(i >= 0 && i < N_CLASSES && "Invalid mips register class requested.");
+ assert(i < N_CLASSES);
return &mips_reg_classes[i];
}
const ir_mode *mode)
{
(void) self;
+ (void) mode;
ASSERT_NO_FLOAT(mode);
return &mips_reg_classes[CLASS_mips_gp];
}
be_abi_call_param_reg(abi, i, reg);
} else {
/* default: all parameters on stack */
- be_abi_call_param_stack(abi, i, 4, 0, 0);
+ be_abi_call_param_stack(abi, i, modes[i], 4, 0, 0);
}
}
* Returns the libFirm configuration parameter for this backend.
*/
static const backend_params *mips_get_libfirm_params(void) {
- static ir_settings_arch_dep_t ad = {
- 1, /* allow subs */
- 0, /* Muls are fast enough on Mips */
- 31, /* shift would be ok */
- 0, /* no Mulhs */
- 0, /* no Mulhu */
- 32, /* Mulhs & Mulhu available for 32 bit */
- };
static backend_params p = {
1, /* need dword lowering */
- 0, /* don't support inlien assembler yet */
+ 0, /* don't support inline assembler yet */
NULL, /* no additional opcodes */
NULL, /* will be set later */
NULL, /* but yet no creator function */
NULL, /* no if conversion settings */
};
- p.dep_param = &ad;
return &p;
}