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

Side by Side Diff: vm/assembler_x64.cc

Issue 10592006: Rework leaf calls as just simple C calls with a signature and not the NativeArgumentDescriptor. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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
« no previous file with comments | « vm/assembler_x64.h ('k') | vm/code_generator.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/heap.h" 9 #include "vm/heap.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 } 1472 }
1473 } 1473 }
1474 1474
1475 1475
1476 void Assembler::LeaveFrame() { 1476 void Assembler::LeaveFrame() {
1477 movq(RSP, RBP); 1477 movq(RSP, RBP);
1478 popq(RBP); 1478 popq(RBP);
1479 } 1479 }
1480 1480
1481 1481
1482 void Assembler::ReserveAlignedFrameSpace(intptr_t frame_space) {
1483 // Reserve space for arguments and align frame before entering
1484 // the C++ world.
1485 AddImmediate(RSP, Immediate(-frame_space));
1486 if (OS::ActivationFrameAlignment() > 0) {
1487 andq(RSP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
1488 }
1489 }
1490
1491
1482 void Assembler::CallRuntime(const RuntimeEntry& entry) { 1492 void Assembler::CallRuntime(const RuntimeEntry& entry) {
1483 entry.Call(this); 1493 entry.Call(this);
1484 } 1494 }
1485 1495
1486 1496
1487 void Assembler::Align(int alignment, int offset) { 1497 void Assembler::Align(int alignment, int offset) {
1488 ASSERT(Utils::IsPowerOfTwo(alignment)); 1498 ASSERT(Utils::IsPowerOfTwo(alignment));
1489 int pos = offset + buffer_.GetPosition(); 1499 int pos = offset + buffer_.GetPosition();
1490 int mod = pos & (alignment - 1); 1500 int mod = pos & (alignment - 1);
1491 if (mod == 0) { 1501 if (mod == 0) {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 comments.SetCommentAt(i, comments_[i]->comment()); 1684 comments.SetCommentAt(i, comments_[i]->comment());
1675 } 1685 }
1676 1686
1677 return comments; 1687 return comments;
1678 } 1688 }
1679 1689
1680 1690
1681 } // namespace dart 1691 } // namespace dart
1682 1692
1683 #endif // defined TARGET_ARCH_X64 1693 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « vm/assembler_x64.h ('k') | vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698