- return arch_data_find(insn, isa, name);
-}
-
-arch_immediate_t *arch_find_immediate(const arch_isa_t *isa, const char *name)
-{
- return arch_data_find(immediate, isa, name);
-}
-
-arch_register_class_t *arch_find_register_class(const arch_isa_t *isa, const char *name)
-{
- return arch_data_find(register_class, isa, name);
-}
-
-arch_register_set_t *arch_find_register_set(const arch_isa_t *isa, const char *name)
-{
- return arch_data_find(register_set, isa, name);
-}
-
-arch_register_set_t *arch_get_register_set_for_class(arch_register_class_t *cls)
-{
- return _arch_get_register_set_for_class(cls);
-}
-
-static INLINE arch_operand_t *_arch_set_operand(arch_insn_format_t *fmt, int pos,
- arch_operand_type_t type)
-{
- arch_operand_t *operand;
- int ofs = arch_inout_to_index(fmt, pos);
-
- assert(ofs < fmt->n_in + fmt->n_out);
-
- operand = &fmt->operands[ofs];
- operand->type = type;
- return operand;
-}
-
-arch_operand_t *arch_set_operand_register_set(arch_insn_format_t *fmt,
- int pos, const arch_register_set_t *set)
-{
- arch_operand_t *op = _arch_set_operand(fmt, pos, arch_operand_type_register_set);
- op->data.set = set;
- return op;
-}
-
-arch_operand_t *arch_set_operand_callback(arch_insn_format_t *fmt,
- int pos, arch_register_callback_t *cb)
-{
- arch_operand_t *op = _arch_set_operand(fmt, pos, arch_operand_type_callback);
- op->data.callback = cb;
- return op;
-}
-
-arch_operand_t *arch_set_operand_immediate(arch_insn_format_t *fmt,
- int pos, const arch_immediate_t *imm)
-{
- arch_operand_t *op = _arch_set_operand(fmt, pos, arch_operand_type_immediate);
- op->data.imm = imm;
- return op;
-}
-
-arch_operand_t *arch_set_operand_memory(arch_insn_format_t *fmt, int pos)
-{
- arch_operand_t *op = _arch_set_operand(fmt, pos, arch_operand_type_memory);
- return op;
-}
-
-arch_operand_t *arch_set_operand_equals(arch_insn_format_t *fmt, int pos, int same_as_pos)
-{
- arch_operand_t *op = _arch_set_operand(fmt, pos, arch_operand_type_equals);
- op->data.same_as_pos = same_as_pos;
- return op;
-}
-
-ir_node *arch_new_node(const arch_insn_t *insn, ir_graph *irg, ir_node *block,
- ir_mode *mode, int arity, ir_node **in)
-{
- ir_node *irn = new_ir_node(NULL, irg, block, insn->op, mode, arity, in);
- arch_irn_data_t *data = (void *) &irn->attr;
-
- data->magic = ARCH_IRN_FOURCC;
- data->insn = insn;
-
- return irn;
-}
-
-ir_node *arch_new_node_bare(const arch_insn_t *insn, ir_graph *irg, int arity)
-{
- int i;
- ir_node **in = alloca(sizeof(in[0]) * arity);
-
- for(i = 0; i < arity; ++i)
- in[i] = new_Unknown(mode_Is);
-
- return arch_new_node(insn, irg, new_Unknown(mode_BB), mode_Is, arity, in);