Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: runtime/vm/intermediate_language_x64.cc

Issue 2003403003: ARM/ARM64: Fix smashed CODE_REG in intrinsics with InvokeMathCFunctionInstrs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/constants_x64.h ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/constants_x64.h ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698