ir_op *op_Pin; ir_op *get_op_Pin (void) { return op_Pin; }
ir_op *op_ASM; ir_op *get_op_ASM (void) { return op_ASM; }
+ir_op *op_Anchor; ir_op *get_op_Anchor (void) { return op_Anchor; }
/*
* Copies all attributes stored in the old node to the new node.
* The operations.
*/
static ir_op_ops *firm_set_default_copy_attr(ir_opcode code, ir_op_ops *ops) {
- if (code == iro_Call)
+ switch(code) {
+ case iro_Call:
ops->copy_attr = call_copy_attr;
- else if (code == iro_Block)
+ break;
+ case iro_Block:
ops->copy_attr = block_copy_attr;
- else if (code == iro_Phi)
+ break;
+ case iro_Phi:
ops->copy_attr = phi_copy_attr;
- else if (code == iro_Filter)
+ break;
+ case iro_Filter:
ops->copy_attr = filter_copy_attr;
- else if (code == iro_ASM)
+ break;
+ case iro_ASM:
ops->copy_attr = ASM_copy_attr;
- else {
+ break;
+ default:
/* not allowed to be NULL */
if (! ops->copy_attr)
ops->copy_attr = default_copy_attr;
/* Creates a new ir operation. */
ir_op *
-new_ir_op(ir_opcode code, const char *name, op_pin_state p,
+new_ir_op(unsigned code, const char *name, op_pin_state p,
unsigned flags, op_arity opar, int op_index, size_t attr_size,
const ir_op_ops *ops)
{
/* HMM: may contain branches so X|Y */
op_ASM = new_ir_op(iro_ASM, "ASM", op_pin_state_mem_pinned, K|X|Y, oparity_variable, -1, sizeof(asm_attr), NULL);
+ op_Anchor = new_ir_op(iro_Anchor, "Anchor", op_pin_state_pinned, N, oparity_variable, -1, 0, NULL);
+
#undef S
#undef H
#undef Y
free_ir_op (op_Bound ); op_Bound = NULL;
free_ir_op (op_Pin ); op_Pin = NULL;
+ free_ir_op (op_ASM ); op_ASM = NULL;
+ free_ir_op (op_Anchor ); op_Anchor = NULL;
}
/* Returns the string for the opcode. */
return get_id_str(op->name);
} /* get_op_name */
-ir_opcode (get_op_code)(const ir_op *op){
+unsigned (get_op_code)(const ir_op *op){
return _get_op_code(op);
} /* get_op_code */