Quick compiler: minor cleanup
Remove dead software floating point support.
Move a common function from target specific to target independent.
Change-Id: Iaf793857f7e0faae02c672b9f1d45a0658143a51
diff --git a/src/compiler/codegen/x86/fp_x86.cc b/src/compiler/codegen/x86/fp_x86.cc
index 14f8b92..78c737d 100644
--- a/src/compiler/codegen/x86/fp_x86.cc
+++ b/src/compiler/codegen/x86/fp_x86.cc
@@ -47,10 +47,16 @@
case Instruction::MUL_FLOAT:
op = kX86MulssRR;
break;
- case Instruction::NEG_FLOAT:
case Instruction::REM_FLOAT_2ADDR:
case Instruction::REM_FLOAT:
- return GenArithOpFloatPortable(cu, opcode, rl_dest, rl_src1, rl_src2);
+ FlushAllRegs(cu); // Send everything to home location
+ CallRuntimeHelperRegLocationRegLocation(cu, ENTRYPOINT_OFFSET(pFmodf), rl_src1, rl_src2, false);
+ rl_result = GetReturn(cu, true);
+ StoreValue(cu, rl_dest, rl_result);
+ return false;
+ case Instruction::NEG_FLOAT:
+ GenNegFloat(cu, rl_dest, rl_src1);
+ return false;
default:
return true;
}
@@ -93,10 +99,16 @@
case Instruction::MUL_DOUBLE:
op = kX86MulsdRR;
break;
- case Instruction::NEG_DOUBLE:
case Instruction::REM_DOUBLE_2ADDR:
case Instruction::REM_DOUBLE:
- return GenArithOpDoublePortable(cu, opcode, rl_dest, rl_src1, rl_src2);
+ FlushAllRegs(cu); // Send everything to home location
+ CallRuntimeHelperRegLocationRegLocation(cu, ENTRYPOINT_OFFSET(pFmod), rl_src1, rl_src2, false);
+ rl_result = GetReturnWide(cu, true);
+ StoreValueWide(cu, rl_dest, rl_result);
+ return false;
+ case Instruction::NEG_DOUBLE:
+ GenNegDouble(cu, rl_dest, rl_src1);
+ return false;
default:
return true;
}
@@ -186,11 +198,14 @@
return false;
}
case Instruction::LONG_TO_DOUBLE:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2d), rl_dest, rl_src);
case Instruction::LONG_TO_FLOAT:
// TODO: inline by using memory as a 64-bit source. Be careful about promoted registers.
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2f), rl_dest, rl_src);
case Instruction::FLOAT_TO_LONG:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pF2l), rl_dest, rl_src);
case Instruction::DOUBLE_TO_LONG:
- return GenConversionPortable(cu, opcode, rl_dest, rl_src);
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pD2l), rl_dest, rl_src);
default:
return true;
}