return op_attr->latency;
}
-/**
- * Returns the argument register requirements of an ia32 node.
- */
-const arch_register_req_t **get_ia32_in_req_all(const ir_node *node)
-{
- const ia32_attr_t *attr = get_ia32_attr_const(node);
- return attr->in_req;
-}
-
-/**
- * Sets the argument register requirements of an ia32 node.
- */
-void set_ia32_in_req_all(ir_node *node, const arch_register_req_t **reqs)
-{
- ia32_attr_t *attr = get_ia32_attr(node);
- attr->in_req = reqs;
-}
-
-/**
- * Returns the argument register requirement at position pos of an ia32 node.
- */
-const arch_register_req_t *get_ia32_in_req(const ir_node *node, int pos)
-{
- const ia32_attr_t *attr = get_ia32_attr_const(node);
- return attr->in_req[pos];
-}
-
-/**
- * Sets the IN register requirements at position pos.
- */
-void set_ia32_req_in(ir_node *node, const arch_register_req_t *req, int pos)
-{
- ia32_attr_t *attr = get_ia32_attr(node);
- attr->in_req[pos] = req;
-}
-
/**
* Returns the condition code of a node.
*/
static const char *ia32_get_old_node_name(const ir_node *irn)
{
- struct obstack *obst = env_cg->isa->name_obst;
+ ir_graph *irg = get_irn_irg(irn);
+ struct obstack *obst = be_get_be_obst(irg);
lc_eoprintf(firm_get_arg_env(), obst, "%+F", irn);
obstack_1grow(obst, 0);
backend_info_t *info;
arch_irn_set_flags(node, flags);
- set_ia32_in_req_all(node, in_reqs);
+ arch_set_in_register_reqs(node, in_reqs);
attr->exec_units = execution_units;
#ifndef NDEBUG
void init_ia32_x87_attributes(ir_node *res)
{
+ ir_graph *irg = get_irn_irg(res);
+ ia32_irg_data_t *irg_data = ia32_get_irg_data(irg);
#ifndef NDEBUG
ia32_attr_t *attr = get_ia32_attr(res);
attr->attr_type |= IA32_ATTR_ia32_x87_attr_t;
#else
(void) res;
#endif
- ia32_current_cg->do_x87_sim = 1;
+ irg_data->do_x87_sim = 1;
}
void init_ia32_asm_attributes(ir_node *res)
/* copy out flags */
new_info->out_infos =
DUP_ARR_D(reg_out_info_t, obst, old_info->out_infos);
+ new_info->in_reqs = old_info->in_reqs;
}
/* Include the generated constructor functions */