/* Insert a store for primitive arguments. */
if (is_atomic_type(param_type)) {
ir_node *store;
- ir_node *mem_input = do_seq ? curr_mem : new_NoMem();
+ ir_node *mem_input = do_seq ? curr_mem : new_r_NoMem(irg);
store = new_rd_Store(dbgi, bl, mem_input, addr, param, 0);
mem = new_r_Proj(store, mode_M, pn_Store_M);
} else {
/* Put caller save into the destroyed set and state registers in the states
* set */
- for (i = 0, n = arch_env_get_n_reg_class(arch_env); i < n; ++i) {
+ for (i = 0, n = arch_env->n_register_classes; i < n; ++i) {
unsigned j;
- const arch_register_class_t *cls = arch_env_get_reg_class(arch_env, i);
+ const arch_register_class_t *cls = &arch_env->register_classes[i];
for (j = 0; j < cls->n_regs; ++j) {
const arch_register_t *reg = arch_register_for_index(cls, j);
}
/* Collect all callee-save registers */
- for (i = 0, n = arch_env_get_n_reg_class(arch_env); i < n; ++i) {
- const arch_register_class_t *cls = arch_env_get_reg_class(arch_env, i);
+ for (i = 0, n = arch_env->n_register_classes; i < n; ++i) {
+ const arch_register_class_t *cls = &arch_env->register_classes[i];
for (j = 0; j < cls->n_regs; ++j) {
const arch_register_t *reg = &cls->regs[j];
if (arch_register_type_is(reg, callee_save) ||
ir_mode *mode = get_type_mode(param_type);
ir_mode *load_mode = arg->load_mode;
- ir_node *load = new_r_Load(start_bl, new_NoMem(), addr, load_mode, cons_floats);
+ ir_node *load = new_r_Load(start_bl, new_r_NoMem(irg), addr, load_mode, cons_floats);
repl = new_r_Proj(load, load_mode, pn_Load_res);
if (mode != load_mode) {
arch_register_t **stateregs = NEW_ARR_F(arch_register_t*, 0);
/* Collect caller save registers */
- n = arch_env_get_n_reg_class(arch_env);
+ n = arch_env->n_register_classes;
for (i = 0; i < n; ++i) {
unsigned j;
- const arch_register_class_t *cls = arch_env_get_reg_class(arch_env, i);
+ const arch_register_class_t *cls = &arch_env->register_classes[i];
for (j = 0; j < cls->n_regs; ++j) {
const arch_register_t *reg = arch_register_for_index(cls, j);
if (arch_register_type_is(reg, state)) {
dbgi = get_irn_dbg_info(pred);
trampoline = get_trampoline(be, entity);
trampoline_const = new_rd_SymConst_addr_ent(dbgi, irg, mode_P_code,
- trampoline, NULL);
+ trampoline);
set_irn_n(node, i, trampoline_const);
continue;
}
dbgi = get_irn_dbg_info(pred);
pic_symbol = get_pic_symbol(be, entity);
pic_symconst = new_rd_SymConst_addr_ent(dbgi, irg, mode_P_code,
- pic_symbol, NULL);
+ pic_symbol);
add = new_r_Add(block, pic_base, pic_symconst, mode);
mark_irn_visited(add);
/* we need an extra indirection for global data outside our current
module. The loads are always safe and can therefore float
and need no memory input */
- load = new_r_Load(block, new_NoMem(), add, mode, cons_floats);
+ load = new_r_Load(block, new_r_NoMem(irg), add, mode, cons_floats);
load_res = new_r_Proj(load, mode, pn_Load_res);
set_irn_n(node, i, load_res);