issue #110 Do not generate fcmpne or dcmpne because these op codes cause a crash in the X86 codegen later on during optimization

mir
Dibyendu Majumdar 5 years ago
parent c3952c2b98
commit 41135f39c0

@ -929,11 +929,11 @@ static JIT_NodeRef is_neq_zero(struct dmr_C *C, struct function *fn, JIT_NodeRef
break;
case JIT_Double:
cond = JIT_CreateNode2C(OP_dcmpne, value, JIT_ZeroValue(fn->injector, JIT_Double));
cond = JIT_CreateNode2C(OP_dcmpneu, value, JIT_ZeroValue(fn->injector, JIT_Double));
break;
case JIT_Float:
cond = JIT_CreateNode2C(OP_fcmpne, value, JIT_ZeroValue(fn->injector, JIT_Float));
cond = JIT_CreateNode2C(OP_fcmpneu, value, JIT_ZeroValue(fn->injector, JIT_Float));
break;
default:
fprintf(stderr, "Cannot construct a zero object of JIT type %d\n", value_type);
@ -1121,9 +1121,9 @@ static JIT_NodeRef output_op_compare(struct dmr_C *C, struct function *fn, struc
break;
case OP_SET_NE:
if (op_type == JIT_Double)
target = JIT_CreateNode2C(OP_dcmpne, lhs, rhs);
target = JIT_CreateNode2C(OP_dcmpneu, lhs, rhs);
else if (op_type == JIT_Float)
target = JIT_CreateNode2C(OP_fcmpne, lhs, rhs);
target = JIT_CreateNode2C(OP_fcmpneu, lhs, rhs);
else if (op_type == JIT_Int64)
target = JIT_CreateNode2C(OP_lcmpne, lhs, rhs);
else if (op_type == JIT_Int32)

Loading…
Cancel
Save