Commit c4196781 authored by Christian Würdig's avatar Christian Würdig
Browse files

added copy attribute function (out_flags is a variable array on irg obstack)

parent 3643119e
......@@ -1466,6 +1466,7 @@ static void *ia32_init(FILE *file_handle) {
ia32_register_init(isa);
ia32_create_opcodes();
ia32_register_copy_attr_func();
if ((ARCH_INTEL(isa->arch) && isa->arch < arch_pentium_4) ||
(ARCH_AMD(isa->arch) && isa->arch < arch_athlon))
......
......@@ -1401,16 +1401,16 @@ int ia32_compare_conv_attr(ia32_attr_t *a, ia32_attr_t *b) {
return !equ;
}
/* Copy attribute function not needed any more, but might be of use later. */
#if 0
/* copies the ia32 attributes */
static void ia32_copy_attr(const ir_node *old_node, ir_node *new_node) {
ia32_attr_t *attr_old = get_ia32_attr(old_node);
ia32_attr_t *attr_new = get_ia32_attr(new_node);
int n_res = get_ia32_n_res(old_node);
ia32_attr_t *attr_old = get_ia32_attr(old_node);
ia32_attr_t *attr_new = get_ia32_attr(new_node);
/* copy the attributes */
memcpy(attr_new, attr_old, sizeof(*attr_new));
memcpy(attr_new, attr_old, get_op_attr_size(get_irn_op(old_node)));
/* copy out flags */
DUP_ARR_D(int, get_irg_obstack(get_irn_irg(new_node)), attr_old->out_flags);
}
/**
......@@ -1424,7 +1424,6 @@ void ia32_register_copy_attr_func(void) {
op->ops.copy_attr = ia32_copy_attr;
}
}
#endif
/* Include the generated constructor functions */
#include "gen_ia32_new_nodes.c.inl"
......@@ -506,6 +506,11 @@ int is_ia32_Cnst(const ir_node *node);
void init_ia32_attributes(ir_node *node, arch_irn_flags_t flags, const ia32_register_req_t **in_reqs, \
const ia32_register_req_t **out_reqs, const be_execution_unit_t ***execution_units, int n_res, unsigned latency);
/**
* Registers the ia32_copy_attr function for all ia32 opcodes.
*/
void ia32_register_copy_attr_func(void);
/* Include the generated headers */
#include "gen_ia32_new_nodes.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment