| Index: runtime/vm/intermediate_language_ia32.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_ia32.cc (revision 32847)
|
| +++ runtime/vm/intermediate_language_ia32.cc (working copy)
|
| @@ -960,9 +960,7 @@
|
| __ movss(result, element_address);
|
| break;
|
| case kTypedDataFloat32ArrayCid:
|
| - // Load single precision float and promote to double.
|
| __ movss(result, element_address);
|
| - __ cvtss2sd(result, locs()->out().fpu_reg());
|
| break;
|
| case kTypedDataFloat64ArrayCid:
|
| __ movsd(result, element_address);
|
| @@ -1109,9 +1107,6 @@
|
| : Location::RequiresFpuRegister());
|
| break;
|
| case kTypedDataFloat32ArrayCid:
|
| - // Need temp register for float-to-double conversion.
|
| - locs->AddTemp(Location::RequiresFpuRegister());
|
| - // Fall through.
|
| case kTypedDataFloat64ArrayCid:
|
| // TODO(srdjan): Support Float64 constants.
|
| locs->set_in(2, Location::RequiresFpuRegister());
|
| @@ -1229,10 +1224,7 @@
|
| }
|
| break;
|
| case kTypedDataFloat32ArrayCid:
|
| - // Convert to single precision.
|
| - __ cvtsd2ss(locs()->temp(0).fpu_reg(), locs()->in(2).fpu_reg());
|
| - // Store.
|
| - __ movss(element_address, locs()->temp(0).fpu_reg());
|
| + __ movss(element_address, locs()->in(2).fpu_reg());
|
| break;
|
| case kTypedDataFloat64ArrayCid:
|
| __ movsd(element_address, locs()->in(2).fpu_reg());
|
| @@ -4166,6 +4158,38 @@
|
| }
|
|
|
|
|
| +LocationSummary* DoubleToFloatInstr::MakeLocationSummary(bool opt) const {
|
| + const intptr_t kNumInputs = 1;
|
| + const intptr_t kNumTemps = 0;
|
| + LocationSummary* result =
|
| + new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| + result->set_in(0, Location::RequiresFpuRegister());
|
| + result->set_out(Location::SameAsFirstInput());
|
| + return result;
|
| +}
|
| +
|
| +
|
| +void DoubleToFloatInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + __ cvtsd2ss(locs()->out().fpu_reg(), locs()->in(0).fpu_reg());
|
| +}
|
| +
|
| +
|
| +LocationSummary* FloatToDoubleInstr::MakeLocationSummary(bool opt) const {
|
| + const intptr_t kNumInputs = 1;
|
| + const intptr_t kNumTemps = 0;
|
| + LocationSummary* result =
|
| + new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| + result->set_in(0, Location::RequiresFpuRegister());
|
| + result->set_out(Location::SameAsFirstInput());
|
| + return result;
|
| +}
|
| +
|
| +
|
| +void FloatToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + __ cvtss2sd(locs()->out().fpu_reg(), locs()->in(0).fpu_reg());
|
| +}
|
| +
|
| +
|
| LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary(bool opt) const {
|
| ASSERT((InputCount() == 1) || (InputCount() == 2));
|
| const intptr_t kNumTemps = 0;
|
|
|