MIPS_GENBINFUNC(add)
MIPS_GENBINFUNC(sub)
-MIPS_GENBINFUNC(div)
MIPS_GENBINFUNC(and)
MIPS_GENBINFUNC(or)
MIPS_GENBINFUNC(xor)
static ir_node* gen_zero_node(mips_transform_env_t *env, dbg_info *ebg, ir_graph *irg, ir_node *block)
{
- ir_node *zero = be_abi_get_callee_save_irn(env->cg->birg->abi, &mips_general_purpose_regs[REG_ZERO]);
+ ir_node *zero = be_abi_get_callee_save_irn(env->cg->birg->abi, &mips_gp_regs[REG_ZERO]);
// TODO make zero nodes work
//ir_node *unknown = new_rd_mips_zero(dbg, irg, block, mode);
assert(get_mode_size_bits(selector_mode) == 32);
+ defaultproj = NULL;
defaultprojn = get_Cond_defaultProj(node);
// go over all projs to find min-&maxval of the switch
static ir_node *create_conv_store_load(mips_transform_env_t *env, ir_mode* srcmode, ir_mode* dstmode) {
ir_node *nomem, *store, *mem_proj, *value_proj, *load;
- entity *mem_entity;
+ ir_entity *mem_entity;
ir_node *node = env->irn;
ir_node *pred = get_Conv_op(node);
ir_node *sp;
ptr_i32type = new_d_type_pointer(id, i32type, mode_P, env->dbg);
mem_entity = new_d_entity(get_irg_frame_type(env->irg), id, ptr_i32type, env->dbg);
- sp = mips_get_reg_node(env, &mips_general_purpose_regs[REG_SP]);
+ sp = mips_get_reg_node(env, &mips_gp_regs[REG_SP]);
nomem = new_ir_node(env->dbg, env->irg, env->block, op_NoMem, mode_M, 0, NULL);
store = new_rd_mips_store_r(env->dbg, env->irg, env->block, nomem, sp, pred, mode_T);
}
static void mips_transform_Spill(mips_transform_env_t* env) {
- ir_node *node = env->irn;
- ir_node *sched_point = NULL;
- ir_node *store, *proj;
- ir_node *nomem = new_rd_NoMem(env->irg);
- ir_node *ptr = get_irn_n(node, 0);
- ir_node *val = get_irn_n(node, 1);
- entity *ent = be_get_frame_entity(node);
+ ir_node *node = env->irn;
+ ir_node *sched_point = NULL;
+ ir_node *store, *proj;
+ ir_node *nomem = new_rd_NoMem(env->irg);
+ ir_node *ptr = get_irn_n(node, 0);
+ ir_node *val = get_irn_n(node, 1);
+ ir_entity *ent = be_get_frame_entity(node);
mips_attr_t *attr;
if(sched_is_scheduled(node)) {
}
static void mips_transform_Reload(mips_transform_env_t* env) {
- ir_node *node = env->irn;
- ir_node *sched_point = NULL;
- ir_node *load, *proj;
- ir_node *ptr = get_irn_n(node, 0);
- ir_node *mem = get_irn_n(node, 1);
- ir_mode *mode = get_irn_mode(node);
- entity *ent = be_get_frame_entity(node);
+ ir_node *node = env->irn;
+ ir_node *sched_point = NULL;
+ ir_node *load, *proj;
+ ir_node *ptr = get_irn_n(node, 0);
+ ir_node *mem = get_irn_n(node, 1);
+ ir_mode *mode = get_irn_mode(node);
+ ir_entity *ent = be_get_frame_entity(node);
const arch_register_t* reg;
mips_attr_t *attr;
*/
void mips_transform_node(ir_node *node, void *env) {
mips_code_gen_t *cgenv = (mips_code_gen_t *)env;
- opcode code = get_irn_opcode(node);
- ir_node *asm_node = node;
+ ir_opcode code = get_irn_opcode(node);
+ ir_node *asm_node = node;
mips_transform_env_t tenv;
if (is_Block(node))
tenv.dbg = get_irn_dbg_info(node);
tenv.irg = current_ir_graph;
tenv.irn = node;
- tenv.mod = cgenv->mod;
+ DEBUG_ONLY(tenv.mod = cgenv->mod;)
tenv.mode = get_irn_mode(node);
tenv.cg = cgenv;
tenv.dbg = get_irn_dbg_info(node);
tenv.irg = current_ir_graph;
tenv.irn = node;
- tenv.mod = cgenv->mod;
+ DEBUG_ONLY(tenv.mod = cgenv->mod;)
tenv.mode = get_irn_mode(node);
tenv.cg = cgenv;
tenv.dbg = get_irn_dbg_info(node);
tenv.irg = current_ir_graph;
tenv.irn = node;
- tenv.mod = cg->mod;
+ DEBUG_ONLY(tenv.mod = cg->mod;)
tenv.mode = get_irn_mode(node);
tenv.cg = cg;