EMIT(CPOS(s,MIR_Move.create(IA32_FMOV, R(FP0), one))); EMIT(CPOS(s,MIR_Compare.create(IA32_FCOMI, R(FP0), two)));
EMIT(CPOS(s,MIR_Move.create(IA32_FMOV, new OPT_RegisterOperand(FP0, VM_TypeReference.Int), one))); EMIT(CPOS(s,MIR_Compare.create(IA32_FCOMI, new OPT_RegisterOperand(FP0, VM_TypeReference.Int), two)));
  protected final void  threeValueFPCmp (OPT_Instruction s) {    // IMPORTANT: FCOMI only sets 3 of the 6 bits in EFLAGS, so     // we can't quite just translate the condition operand as if it     // were an integer compare.    // FCMOI sets ZF, PF, and CF as follows:     // Compare Results      ZF     PF      CF    // left > right          0      0       0    // left < right          0      0       1    // left == right         1      0       0    // UNORDERED             1      1       1    OPT_RegisterOperand one = (OPT_RegisterOperand) Binary.getClearVal1(s);    OPT_RegisterOperand two = (OPT_RegisterOperand) Binary.getClearVal2(s);    OPT_RegisterOperand res = Binary.getClearResult(s);	 OPT_RegisterOperand temp = burs.ir.regpool.makeTempInt();    OPT_Register FP0 = burs.ir.regpool.getPhysicalRegisterSet().getFPR(0);    if ((s.operator == DOUBLE_CMPL) || (s.operator == FLOAT_CMPL)) {		EMIT(CPOS(s,MIR_Move.create(IA32_MOV, temp, IC(0))));		// Perform compare		EMIT(CPOS(s,MIR_Move.create(IA32_FMOV, R(FP0), one)));		EMIT(CPOS(s,MIR_Compare.create(IA32_FCOMI, R(FP0), two)));		// res = (value1 > value2) ? 1 : 0		// temp = ((value1 < value2) || unordered) ? -1 : 0		EMIT(CPOS(s,MIR_Set.create(IA32_SET__B, res,OPT_IA32ConditionOperand.LGT())));		EMIT(CPOS(s,MIR_BinaryAcc.create(IA32_SBB, temp.copyRO(), temp.copyRO())));	 }	 else {		OPT_RegisterOperand temp2 = burs.ir.regpool.makeTempInt();		// Perform compare		EMIT(CPOS(s,MIR_Move.create(IA32_FMOV, R(FP0), one)));		EMIT(CPOS(s,MIR_Compare.create(IA32_FCOMI, R(FP0), two)));		// res = (value1 > value2) ? 1 : 0		// temp2 = (value1 unordered value2) ? 1 : 0		// temp = ((value1 unordered value2) ? 1 : 0) - 0 - CF      // (i.e. temp = (value1 < value2) ? -1 : 0)		EMIT(CPOS(s,MIR_Set.create(IA32_SET__B, temp, OPT_IA32ConditionOperand.PO())));		EMIT(CPOS(s,MIR_Set.create(IA32_SET__B, res, OPT_IA32ConditionOperand.LGT())));		EMIT(CPOS(s,MIR_Move.create(IA32_MOV, temp2, temp.copyRO())));		EMIT(CPOS(s,MIR_BinaryAcc.create(IA32_SBB, temp.copyRO(), IC(0))));		// Put result from temp2 in res		EMIT(CPOS(s,MIR_BinaryAcc.create(IA32_OR, res.copyRO(), temp2.copyRO())));	 }	 EMIT(CPOS(s,MIR_BinaryAcc.create(IA32_OR, res.copyRO(), temp.copyRO())));	 EMIT(MIR_Unary.mutate(s,IA32_MOVSX__B,res.copyRO(),res.copyRO()));  }