+ for (i = 0, n = get_irn_arity(mach_op); i < n; ++i) {
+ ir_node *op = get_irn_n(mach_op, i);
+
+ if (is_irn_machine_operand(op)) {
+ add_machine_operands(env, insn, op);
+ } else if (arch_irn_consider_in_reg_alloc(arch_env, env->cls, op)) {
+ be_operand_t o;
+
+ /* found a register use, create an operand */
+ o.req = arch_get_register_req(arch_env, mach_op, i);
+ o.carrier = op;
+ o.irn = insn->irn;
+ o.pos = i;
+ o.partner = NULL;
+ o.has_constraints = arch_register_req_is(o.req, limited);
+ obstack_grow(obst, &o, sizeof(o));
+ insn->n_ops++;
+ insn->in_constraints |= o.has_constraints;
+ }
+ }
+}
+
+/**
+ * Create a be_insn_t for an IR node.
+ *
+ * @param env the insn construction environment
+ * @param irn the irn for which the be_insn should be build
+ *
+ * @return the be_insn for the IR node
+ */