| Index: runtime/vm/intermediate_language_ia32.cc
|
| diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
|
| index 629a225fc1d3b88f2dc29be12881530c95c8ac94..7af403b498d3eeaf23287c88219dbf08fa2de840 100644
|
| --- a/runtime/vm/intermediate_language_ia32.cc
|
| +++ b/runtime/vm/intermediate_language_ia32.cc
|
| @@ -5012,6 +5012,41 @@ void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| +LocationSummary* MintToDoubleInstr::MakeLocationSummary(Isolate* isolate,
|
| + bool opt) const {
|
| + const intptr_t kNumInputs = 1;
|
| + const intptr_t kNumTemps = 0;
|
| + LocationSummary* result = new(isolate) LocationSummary(
|
| + isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| + result->set_in(0, Location::Pair(Location::RequiresRegister(),
|
| + Location::RequiresRegister()));
|
| + result->set_out(0, Location::RequiresFpuRegister());
|
| + return result;
|
| +}
|
| +
|
| +
|
| +void MintToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + PairLocation* pair = locs()->in(0).AsPairLocation();
|
| + Register result1 = pair->At(0).reg();
|
| + Register result2 = pair->At(1).reg();
|
| +
|
| + FpuRegister result = locs()->out(0).fpu_reg();
|
| +
|
| + // Push hi.
|
| + __ pushl(result2);
|
| + // Push lo.
|
| + __ pushl(result1);
|
| + // Perform conversion from Mint to double.
|
| + __ fildl(Address(ESP, 0));
|
| + // Pop FPU stack onto regular stack.
|
| + __ fstpl(Address(ESP, 0));
|
| + // Copy into result.
|
| + __ movsd(result, Address(ESP, 0));
|
| + // Pop args.
|
| + __ addl(ESP, Immediate(2 * kWordSize));
|
| +}
|
| +
|
| +
|
| LocationSummary* DoubleToIntegerInstr::MakeLocationSummary(Isolate* isolate,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
|
|