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

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

Issue 335443002: Setup R10/EDX to be valid Oops before stub calls (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Reserve space for arguments and align frame before entering C++ world. 76 // Reserve space for arguments and align frame before entering C++ world.
77 __ subq(RSP, Immediate(sizeof(NativeArguments))); 77 __ subq(RSP, Immediate(sizeof(NativeArguments)));
78 if (OS::ActivationFrameAlignment() > 1) { 78 if (OS::ActivationFrameAlignment() > 1) {
79 __ andq(RSP, Immediate(~(OS::ActivationFrameAlignment() - 1))); 79 __ andq(RSP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
80 } 80 }
81 81
82 // Pass NativeArguments structure by value and call runtime. 82 // Pass NativeArguments structure by value and call runtime.
83 __ movq(Address(RSP, isolate_offset), CTX); // Set isolate in NativeArgs. 83 __ movq(Address(RSP, isolate_offset), CTX); // Set isolate in NativeArgs.
84 // There are no runtime calls to closures, so we do not need to set the tag 84 // There are no runtime calls to closures, so we do not need to set the tag
85 // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_. 85 // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_.
86 __ SmiUntag(R10);
86 __ movq(Address(RSP, argc_tag_offset), R10); // Set argc in NativeArguments. 87 __ movq(Address(RSP, argc_tag_offset), R10); // Set argc in NativeArguments.
87 __ leaq(RAX, Address(RBP, R10, TIMES_8, 1 * kWordSize)); // Compute argv. 88 __ leaq(RAX, Address(RBP, R10, TIMES_8, 1 * kWordSize)); // Compute argv.
88 __ movq(Address(RSP, argv_offset), RAX); // Set argv in NativeArguments. 89 __ movq(Address(RSP, argv_offset), RAX); // Set argv in NativeArguments.
89 __ addq(RAX, Immediate(1 * kWordSize)); // Retval is next to 1st argument. 90 __ addq(RAX, Immediate(1 * kWordSize)); // Retval is next to 1st argument.
90 __ movq(Address(RSP, retval_offset), RAX); // Set retval in NativeArguments. 91 __ movq(Address(RSP, retval_offset), RAX); // Set retval in NativeArguments.
91 #if defined(_WIN64) 92 #if defined(_WIN64)
92 ASSERT(sizeof(NativeArguments) > CallingConventions::kRegisterTransferLimit); 93 ASSERT(sizeof(NativeArguments) > CallingConventions::kRegisterTransferLimit);
93 __ movq(CallingConventions::kArg1Reg, RSP); 94 __ movq(CallingConventions::kArg1Reg, RSP);
94 #endif 95 #endif
95 __ CallCFunction(RBX); 96 __ CallCFunction(RBX);
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 1858
1858 __ movq(left, Address(RSP, 2 * kWordSize)); 1859 __ movq(left, Address(RSP, 2 * kWordSize));
1859 __ movq(right, Address(RSP, 1 * kWordSize)); 1860 __ movq(right, Address(RSP, 1 * kWordSize));
1860 GenerateIdenticalWithNumberCheckStub(assembler, left, right); 1861 GenerateIdenticalWithNumberCheckStub(assembler, left, right);
1861 __ ret(); 1862 __ ret();
1862 } 1863 }
1863 1864
1864 } // namespace dart 1865 } // namespace dart
1865 1866
1866 #endif // defined TARGET_ARCH_X64 1867 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/flow_graph_compiler_ia32.cc ('K') | « runtime/vm/stub_code_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698