| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 5168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5179 // Calling convention on x64 uses XMM0 and XMM1 to pass the first two | 5179 // Calling convention on x64 uses XMM0 and XMM1 to pass the first two |
| 5180 // double arguments and XMM0 to return the result. Unfortunately | 5180 // double arguments and XMM0 to return the result. Unfortunately |
| 5181 // currently we can't specify these registers because ParallelMoveResolver | 5181 // currently we can't specify these registers because ParallelMoveResolver |
| 5182 // assumes that XMM0 is free at all times. | 5182 // assumes that XMM0 is free at all times. |
| 5183 // TODO(vegorov): allow XMM0 to be used. | 5183 // TODO(vegorov): allow XMM0 to be used. |
| 5184 ASSERT((InputCount() == 1) || (InputCount() == 2)); | 5184 ASSERT((InputCount() == 1) || (InputCount() == 2)); |
| 5185 const intptr_t kNumTemps = | 5185 const intptr_t kNumTemps = |
| 5186 (recognized_kind() == MethodRecognizer::kMathDoublePow) ? 3 : 1; | 5186 (recognized_kind() == MethodRecognizer::kMathDoublePow) ? 3 : 1; |
| 5187 LocationSummary* result = new(zone) LocationSummary( | 5187 LocationSummary* result = new(zone) LocationSummary( |
| 5188 zone, InputCount(), kNumTemps, LocationSummary::kCall); | 5188 zone, InputCount(), kNumTemps, LocationSummary::kCall); |
| 5189 ASSERT(R13 != CALLEE_SAVED_TEMP); |
| 5190 ASSERT(((1 << R13) & CallingConventions::kCalleeSaveCpuRegisters) != 0); |
| 5189 result->set_temp(0, Location::RegisterLocation(R13)); | 5191 result->set_temp(0, Location::RegisterLocation(R13)); |
| 5190 result->set_in(0, Location::FpuRegisterLocation(XMM2)); | 5192 result->set_in(0, Location::FpuRegisterLocation(XMM2)); |
| 5191 if (InputCount() == 2) { | 5193 if (InputCount() == 2) { |
| 5192 result->set_in(1, Location::FpuRegisterLocation(XMM1)); | 5194 result->set_in(1, Location::FpuRegisterLocation(XMM1)); |
| 5193 } | 5195 } |
| 5194 if (recognized_kind() == MethodRecognizer::kMathDoublePow) { | 5196 if (recognized_kind() == MethodRecognizer::kMathDoublePow) { |
| 5195 // Temp index 1. | 5197 // Temp index 1. |
| 5196 result->set_temp(1, Location::RegisterLocation(RAX)); | 5198 result->set_temp(1, Location::RegisterLocation(RAX)); |
| 5197 // Temp index 2. | 5199 // Temp index 2. |
| 5198 result->set_temp(2, Location::FpuRegisterLocation(XMM4)); | 5200 result->set_temp(2, Location::FpuRegisterLocation(XMM4)); |
| (...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6556 __ Drop(1); | 6558 __ Drop(1); |
| 6557 __ popq(result); | 6559 __ popq(result); |
| 6558 } | 6560 } |
| 6559 | 6561 |
| 6560 | 6562 |
| 6561 } // namespace dart | 6563 } // namespace dart |
| 6562 | 6564 |
| 6563 #undef __ | 6565 #undef __ |
| 6564 | 6566 |
| 6565 #endif // defined TARGET_ARCH_X64 | 6567 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |