* Translate an Unknown into two.
*/
static void lower_Unknown(ir_node *node, ir_mode *mode, lower_env_t *env) {
- int idx = get_irn_idx(node);
+ int idx = get_irn_idx(node);
ir_graph *irg = current_ir_graph;
+ ir_mode *low_mode = env->params->low_unsigned;
- env->entries[idx]->low_word =
+ env->entries[idx]->low_word = new_r_Unknown(irg, low_mode);
env->entries[idx]->high_word = new_r_Unknown(irg, mode);
} /* lower_Unknown */
return (e1->imode - e2->imode) | (e1->omode - e2->omode);
} /* static int cmp_conv_tp */
+/**
+ * Enter a lowering function into an ir_op.
+ */
+static void enter_lower_func(ir_op *op, lower_func func) {
+ op->ops.generic = (op_func)func;
+}
+
/*
* Do the lowering.
*/
/* first clear the generic function pointer for all ops */
clear_irp_opcodes_generic_func();
-#define LOWER2(op, fkt) op_##op->ops.generic = (op_func)fkt
+#define LOWER2(op, fkt) enter_lower_func(op_##op, fkt)
#define LOWER(op) LOWER2(op, lower_##op)
#define LOWER_BIN(op) LOWER2(op, lower_Binop)
#define LOWER_UN(op) LOWER2(op, lower_Unop)