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

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

Issue 13801014: Fix bug in ParallelMoveResolver::EmitSwap: implement swaps of FPU spill slots. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix typo Created 7 years, 8 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 | Annotate | Revision Log
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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 2770 matching lines...) Expand 10 before | Expand all | Expand 10 after
2781 LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary() const { 2781 LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary() const {
2782 // Calling convention on x64 uses XMM0 and XMM1 to pass the first two 2782 // Calling convention on x64 uses XMM0 and XMM1 to pass the first two
2783 // double arguments and XMM0 to return the result. Unfortunately 2783 // double arguments and XMM0 to return the result. Unfortunately
2784 // currently we can't specify these registers because ParallelMoveResolver 2784 // currently we can't specify these registers because ParallelMoveResolver
2785 // assumes that XMM0 is free at all times. 2785 // assumes that XMM0 is free at all times.
2786 // TODO(vegorov): allow XMM0 to be used. 2786 // TODO(vegorov): allow XMM0 to be used.
2787 ASSERT((InputCount() == 1) || (InputCount() == 2)); 2787 ASSERT((InputCount() == 1) || (InputCount() == 2));
2788 const intptr_t kNumTemps = 0; 2788 const intptr_t kNumTemps = 0;
2789 LocationSummary* result = 2789 LocationSummary* result =
2790 new LocationSummary(InputCount(), kNumTemps, LocationSummary::kCall); 2790 new LocationSummary(InputCount(), kNumTemps, LocationSummary::kCall);
2791 result->set_in(0, Location::FpuRegisterLocation(XMM1, kUnboxedDouble)); 2791 result->set_in(0, Location::FpuRegisterLocation(XMM1));
2792 if (InputCount() == 2) { 2792 if (InputCount() == 2) {
2793 result->set_in(1, Location::FpuRegisterLocation(XMM2, kUnboxedDouble)); 2793 result->set_in(1, Location::FpuRegisterLocation(XMM2));
2794 } 2794 }
2795 result->set_out(Location::FpuRegisterLocation(XMM1, kUnboxedDouble)); 2795 result->set_out(Location::FpuRegisterLocation(XMM1));
2796 return result; 2796 return result;
2797 } 2797 }
2798 2798
2799 2799
2800 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2800 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2801 ASSERT(locs()->in(0).fpu_reg() == XMM1); 2801 ASSERT(locs()->in(0).fpu_reg() == XMM1);
2802 __ EnterFrame(0); 2802 __ EnterFrame(0);
2803 __ ReserveAlignedFrameSpace(0); 2803 __ ReserveAlignedFrameSpace(0);
2804 __ movaps(XMM0, locs()->in(0).fpu_reg()); 2804 __ movaps(XMM0, locs()->in(0).fpu_reg());
2805 if (InputCount() == 2) { 2805 if (InputCount() == 2) {
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 PcDescriptors::kOther, 3356 PcDescriptors::kOther,
3357 locs()); 3357 locs());
3358 __ Drop(2); // Discard type arguments and receiver. 3358 __ Drop(2); // Discard type arguments and receiver.
3359 } 3359 }
3360 3360
3361 } // namespace dart 3361 } // namespace dart
3362 3362
3363 #undef __ 3363 #undef __
3364 3364
3365 #endif // defined TARGET_ARCH_X64 3365 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698