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))
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);
}
/**
op->ops.copy_attr = ia32_copy_attr;
}
}
-#endif
/* Include the generated constructor functions */
#include "gen_ia32_new_nodes.c.inl"
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"