From: Michael Beck Date: Sat, 24 May 2008 16:22:08 +0000 (+0000) Subject: - no need to add two custom pointers: the tag is now simply a 32bit number, typically... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=e109f4dc135eacdea5f83775117f695d9aa99280;p=libfirm - no need to add two custom pointers: the tag is now simply a 32bit number, typically a FOURCC code [r19748] --- diff --git a/ir/be/scripts/generate_new_opcodes.pl b/ir/be/scripts/generate_new_opcodes.pl index 2246f0621..b691e7992 100755 --- a/ir/be/scripts/generate_new_opcodes.pl +++ b/ir/be/scripts/generate_new_opcodes.pl @@ -584,7 +584,7 @@ foreach my $op (keys(%nodes)) { $temp = "\top_$op = new_ir_op(cur_opcode + iro_$op, \"$op\", op_pin_state_".$n{"state"}.", ".$n{"op_flags"}; $temp .= "|M, ".translate_arity($arity).", 0, sizeof(${attr_type}), &ops);\n"; push(@obst_new_irop, $temp); - push(@obst_new_irop, "\tset_op_tag(op_$op, &$arch\_op_tag);\n"); + push(@obst_new_irop, "\tset_op_tag(op_$op, $arch\_op_tag);\n"); if(defined($default_op_attr_type)) { push(@obst_new_irop, "\tattr = ($default_op_attr_type *) xmalloc(sizeof(attr[0]));\n"); push(@obst_new_irop, "\tmemset(attr, 0, sizeof(attr[0]));\n"); @@ -645,7 +645,7 @@ if (length($arch) >= 4) { print OUT<ops; } -static INLINE void _set_op_tag(ir_op *op, void *tag) { +static INLINE void _set_op_tag(ir_op *op, unsigned tag) { op->tag = tag; } -static INLINE void *_get_op_tag(const ir_op *op) { +static INLINE unsigned _get_op_tag(const ir_op *op) { return op->tag; } diff --git a/ir/ir/irtypes.h b/ir/ir/irtypes.h index 9baed2a6f..52dd2a2ee 100644 --- a/ir/ir/irtypes.h +++ b/ir/ir/irtypes.h @@ -56,7 +56,7 @@ struct ir_op { op_arity opar; /**< The arity of operator. */ int op_index; /**< The index of the first data operand, 0 for most cases, 1 for Div etc. */ unsigned flags; /**< Flags describing the behavior of the ir_op, a bitmasks of irop_flags. */ - void *tag; /**< Some custom pointer the op's creator can attach stuff to. */ + unsigned tag; /**< Some custom TAG value the op's creator set to. */ void *attr; /**< custom pointer where op's creator can attach attribute stuff to. */ ir_op_ops ops; /**< The operations of the this op. */