| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 3166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3177 return NULL; | 3177 return NULL; |
| 3178 } | 3178 } |
| 3179 | 3179 |
| 3180 | 3180 |
| 3181 void BinaryUint32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3181 void BinaryUint32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3182 UNIMPLEMENTED(); | 3182 UNIMPLEMENTED(); |
| 3183 } | 3183 } |
| 3184 | 3184 |
| 3185 | 3185 |
| 3186 LocationSummary* MathUnaryInstr::MakeLocationSummary() const { | 3186 LocationSummary* MathUnaryInstr::MakeLocationSummary() const { |
| 3187 if ((kind() == MethodRecognizer::kMathSin) || |
| 3188 (kind() == MethodRecognizer::kMathCos)) { |
| 3189 const intptr_t kNumInputs = 1; |
| 3190 const intptr_t kNumTemps = 0; |
| 3191 LocationSummary* summary = |
| 3192 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 3193 summary->set_in(0, Location::FpuRegisterLocation(D6)); |
| 3194 summary->set_out(Location::FpuRegisterLocation(D0)); |
| 3195 return summary; |
| 3196 } |
| 3187 const intptr_t kNumInputs = 1; | 3197 const intptr_t kNumInputs = 1; |
| 3188 const intptr_t kNumTemps = 0; | 3198 const intptr_t kNumTemps = 0; |
| 3189 LocationSummary* summary = | 3199 LocationSummary* summary = |
| 3190 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3200 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3191 summary->set_in(0, Location::RequiresFpuRegister()); | 3201 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3192 summary->set_out(Location::RequiresFpuRegister()); | 3202 summary->set_out(Location::RequiresFpuRegister()); |
| 3193 return summary; | 3203 return summary; |
| 3194 } | 3204 } |
| 3195 | 3205 |
| 3196 | 3206 |
| 3197 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3207 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3198 if (kind() == MethodRecognizer::kMathSqrt) { | 3208 if (kind() == MethodRecognizer::kMathSqrt) { |
| 3199 __ sqrtd(locs()->out().fpu_reg(), locs()->in(0).fpu_reg()); | 3209 __ sqrtd(locs()->out().fpu_reg(), locs()->in(0).fpu_reg()); |
| 3200 } else { | 3210 } else { |
| 3201 UNIMPLEMENTED(); | 3211 __ CallRuntime(TargetFunction(), InputCount()); |
| 3202 } | 3212 } |
| 3203 } | 3213 } |
| 3204 | 3214 |
| 3205 | 3215 |
| 3206 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const { | 3216 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const { |
| 3207 if (result_cid() == kDoubleCid) { | 3217 if (result_cid() == kDoubleCid) { |
| 3208 const intptr_t kNumInputs = 2; | 3218 const intptr_t kNumInputs = 2; |
| 3209 const intptr_t kNumTemps = 1; | 3219 const intptr_t kNumTemps = 1; |
| 3210 LocationSummary* summary = | 3220 LocationSummary* summary = |
| 3211 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3221 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4065 compiler->GenerateCall(token_pos(), | 4075 compiler->GenerateCall(token_pos(), |
| 4066 &label, | 4076 &label, |
| 4067 PcDescriptors::kOther, | 4077 PcDescriptors::kOther, |
| 4068 locs()); | 4078 locs()); |
| 4069 __ Drop(2); // Discard type arguments and receiver. | 4079 __ Drop(2); // Discard type arguments and receiver. |
| 4070 } | 4080 } |
| 4071 | 4081 |
| 4072 } // namespace dart | 4082 } // namespace dart |
| 4073 | 4083 |
| 4074 #endif // defined TARGET_ARCH_MIPS | 4084 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |