Changed API of RegParams
authorSebastian Hack <hack@ipd.info.uni-karlsruhe.de>
Thu, 23 Feb 2006 14:52:38 +0000 (14:52 +0000)
committerSebastian Hack <hack@ipd.info.uni-karlsruhe.de>
Thu, 23 Feb 2006 14:52:38 +0000 (14:52 +0000)
ir/be/beabi.c
ir/be/benode.c
ir/be/benode_t.h

index 0890129..9fff1b8 100644 (file)
@@ -422,8 +422,8 @@ static void modify_irg(be_abi_irg_t *env)
                        n_reg_param += arg->in_reg;
                }
 
-               reg_params    = be_new_RegParams(irg, n_reg_param);
-               reg_params_bl = get_nodes_block(reg_params);
+               reg_params_bl = get_irg_start_block(irg);
+               reg_params    = be_new_RegParams(irg, reg_params_bl, n_reg_param);
                reg_params_nr = 0;
 
                proj_sp       = new_r_Proj(irg, reg_params_bl, reg_params, sp->reg_class->mode, reg_params_nr);
index b87dcfd..5489b8b 100644 (file)
@@ -365,6 +365,17 @@ ir_node *be_new_StackParam(const arch_register_class_t *cls, ir_graph *irg, ir_n
        return irn;
 }
 
+ir_node *be_new_RegParams(ir_graph *irg, ir_node *bl, int n_outs)
+{
+       be_node_attr_t *a;
+       ir_node *irn;
+       ir_node *in[1];
+
+       irn = new_ir_node(NULL, irg, bl, op_RegParams, mode_T, 0, in);
+       init_node_attr(irn, NULL, irg, n_outs);
+       return irn;
+}
+
 int be_is_Spill         (const ir_node *irn) { return get_irn_be_opcode(irn) == beo_Spill          ; }
 int be_is_Reload        (const ir_node *irn) { return get_irn_be_opcode(irn) == beo_Reload         ; }
 int be_is_Copy          (const ir_node *irn) { return get_irn_be_opcode(irn) == beo_Copy           ; }
index fa078f4..4edfe7e 100644 (file)
@@ -77,7 +77,7 @@ be_stack_dir_t be_get_IncSP_direction(ir_node *irn);
 
 ir_node *be_new_Call(ir_graph *irg, ir_node *bl, ir_node *mem, ir_node *sp, ir_node *ptr, int n_outs, int n, ir_node *in[]);
 ir_node *be_new_StackParam(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, ir_mode *mode, ir_node *frame_pointer, unsigned offset);
-ir_node *be_new_RegParams(ir_graph *irg, int n_out);
+ir_node *be_new_RegParams(ir_graph *irg, ir_node *bl, int n_out);
 ir_node *be_new_NoReg(const arch_register_t *reg, ir_graph *irg, ir_node *bl);
 
 ir_node *be_spill(const arch_env_t *arch_env, ir_node *irn,ir_node *spill_ctx);