Chromium Code Reviews| Index: runtime/vm/intermediate_language_ia32.cc |
| diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc |
| index c336720b8ce7e18fce225630dd80b9c7cd768641..6dda843b95d67e83cc8cda104b11aede9395171e 100644 |
| --- a/runtime/vm/intermediate_language_ia32.cc |
| +++ b/runtime/vm/intermediate_language_ia32.cc |
| @@ -2426,6 +2426,33 @@ void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| } |
| +LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary() const { |
| + ASSERT((InputCount() == 1) || (InputCount() == 2)); |
| + const intptr_t kNumTemps = 0; |
| + LocationSummary* result = |
| + new LocationSummary(InputCount(), kNumTemps, LocationSummary::kCall); |
| + result->set_in(0, Location::FpuRegisterLocation(XMM1, Location::kDouble)); |
|
Florian Schneider
2013/01/21 16:31:26
Do you really need fixed locations here? You could
Vyacheslav Egorov (Google)
2013/01/21 16:50:08
Instruction is marked as a call to ensure that reg
|
| + if (InputCount() == 2) { |
| + result->set_in(1, Location::FpuRegisterLocation(XMM2, Location::kDouble)); |
| + } |
| + result->set_out(Location::FpuRegisterLocation(XMM1, Location::kDouble)); |
| + return result; |
| +} |
| + |
| + |
| +void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| + __ enter(Immediate(0)); |
| + __ ReserveAlignedFrameSpace(kDoubleSize * InputCount()); |
| + for (intptr_t i = 0; i < InputCount(); i++) { |
| + __ movsd(Address(ESP, -kDoubleSize * i), locs()->in(i).fpu_reg()); |
| + } |
| + __ CallRuntime(TargetFunction()); |
| + __ fstpl(Address(ESP, 0)); |
| + __ movsd(locs()->out().fpu_reg(), Address(ESP, 0)); |
| + __ leave(); |
| +} |
| + |
| + |
| LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const { |
| return MakeCallSummary(); |
| } |