Index: runtime/vm/intermediate_language_mips.cc |
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc |
index 564245c75933cd51d091ead709543bb5dc1f6747..04713cd2f0f51a5329b3791f3277075e7473927d 100644 |
--- a/runtime/vm/intermediate_language_mips.cc |
+++ b/runtime/vm/intermediate_language_mips.cc |
@@ -4118,25 +4118,19 @@ void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
- const intptr_t kNumTemps = 1; |
+ const intptr_t kNumTemps = 0; |
LocationSummary* summary = new(zone) LocationSummary( |
zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
summary->set_in(0, Location::RequiresFpuRegister()); |
summary->set_out(0, Location::RequiresFpuRegister()); |
- summary->set_temp(0, Location::RequiresFpuRegister()); |
return summary; |
} |
void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
- // TODO(zra): Implement vneg. |
- const Double& minus_one = Double::ZoneHandle(Double::NewCanonical(-1)); |
- __ LoadObject(TMP, minus_one); |
FpuRegister result = locs()->out(0).fpu_reg(); |
FpuRegister value = locs()->in(0).fpu_reg(); |
- FpuRegister temp_fp = locs()->temp(0).fpu_reg(); |
- __ LoadDFromOffset(temp_fp, TMP, Double::value_offset() - kHeapObjectTag); |
- __ muld(result, value, temp_fp); |
+ __ negd(result, value); |
} |