#include "irgmod.h"
#include "irgopt.h"
#include "irgwalk.h"
-#include "iredges.h "
+#include "iredges.h"
#include "irdump.h"
#include "irextbb.h"
const mips_register_req_t *irn_req;
long node_pos = pos == -1 ? 0 : pos;
ir_mode *mode = get_irn_mode(irn);
- firm_dbg_module_t *mod = firm_dbg_register(DEBUG_MODULE);
+ FIRM_DBG_REGISTER(firm_dbg_module_t *mod, DEBUG_MODULE);
if (is_Block(irn) || mode == mode_X || mode == mode_M) {
DBG((mod, LEVEL_1, "ignoring mode_T, mode_M node %+F\n", irn));
cg->impl = &mips_code_gen_if;
cg->irg = birg->irg;
cg->reg_set = new_set(mips_cmp_irn_reg_assoc, 1024);
- cg->mod = firm_dbg_register("firm.be.mips.cg");
cg->out = F;
cg->arch_env = birg->main_env->arch_env;
cg->birg = birg;
cg->bl_list = NULL;
+ FIRM_DBG_REGISTER(cg->mod, "firm.be.mips.cg");
isa->num_codegens++;
return &mips_code_gen_if;
}
+/**
+ * Returns the necessary byte alignment for storing a register of given class.
+ */
+static int mips_get_reg_class_alignment(const void *self, const arch_register_class_t *cls) {
+ ir_mode *mode = arch_register_class_mode(cls);
+ return get_mode_size_bytes(mode);
+}
+
#ifdef WITH_LIBCORE
static void mips_register_options(lc_opt_entry_t *ent)
{
mips_get_irn_handler,
mips_get_code_generator_if,
mips_get_list_sched_selector,
+ mips_get_reg_class_alignment
};