Chromium Code Reviews| Index: runtime/vm/intermediate_language_mips.cc |
| =================================================================== |
| --- runtime/vm/intermediate_language_mips.cc (revision 35690) |
| +++ runtime/vm/intermediate_language_mips.cc (working copy) |
| @@ -3512,8 +3512,7 @@ |
| LocationSummary* MathUnaryInstr::MakeLocationSummary(bool opt) const { |
| - if ((kind() == MethodRecognizer::kMathSin) || |
| - (kind() == MethodRecognizer::kMathCos)) { |
| + if ((kind() == MathUnaryInstr::kSin) || (kind() == MathUnaryInstr::kCos)) { |
| const intptr_t kNumInputs = 1; |
| const intptr_t kNumTemps = 0; |
| LocationSummary* summary = |
| @@ -3522,6 +3521,8 @@ |
| summary->set_out(0, Location::FpuRegisterLocation(D0)); |
| return summary; |
| } |
| + ASSERT((kind() == MathUnaryInstr::kSqrt) || |
|
Cutch
2014/05/02 21:24:48
here too
srdjan
2014/05/02 22:05:21
Done.
|
| + (kind() == MathUnaryInstr::kDoubleSquare)); |
| const intptr_t kNumInputs = 1; |
| const intptr_t kNumTemps = 0; |
| LocationSummary* summary = |
| @@ -3533,8 +3534,12 @@ |
| void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| - if (kind() == MethodRecognizer::kMathSqrt) { |
| + if (kind() == MathUnaryInstr::kSqrt) { |
| __ sqrtd(locs()->out(0).fpu_reg(), locs()->in(0).fpu_reg()); |
| + } else if (kind() == MathUnaryInstr::kDoubleSquare) { |
| + DRegister val = locs()->in(0).fpu_reg(); |
| + DRegister result = locs()->out(0).fpu_reg(); |
| + __ muld(result, val, val); |
| } else { |
| __ CallRuntime(TargetFunction(), InputCount()); |
| } |