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

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

Issue 1259713005: Save a few register moves in function prolog on arm64 by using the same pattern (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 5 years, 4 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/intermediate_language_arm.cc ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 __ Comment("Stack Check"); 96 __ Comment("Stack Check");
97 const intptr_t fp_sp_dist = 97 const intptr_t fp_sp_dist =
98 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; 98 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize;
99 ASSERT(fp_sp_dist <= 0); 99 ASSERT(fp_sp_dist <= 0);
100 __ sub(R2, SP, Operand(FP)); 100 __ sub(R2, SP, Operand(FP));
101 __ CompareImmediate(R2, fp_sp_dist); 101 __ CompareImmediate(R2, fp_sp_dist);
102 __ b(&stack_ok, EQ); 102 __ b(&stack_ok, EQ);
103 __ brk(0); 103 __ brk(0);
104 __ Bind(&stack_ok); 104 __ Bind(&stack_ok);
105 #endif 105 #endif
106 ASSERT(__ constant_pool_allowed());
106 __ LeaveDartFrame(); // Disallows constant pool use. 107 __ LeaveDartFrame(); // Disallows constant pool use.
107 __ ret(); 108 __ ret();
108 // This ReturnInstr may be emitted out of order by the optimizer. The next 109 // This ReturnInstr may be emitted out of order by the optimizer. The next
109 // block may be a target expecting a properly set constant pool pointer. 110 // block may be a target expecting a properly set constant pool pointer.
110 __ set_constant_pool_allowed(true); 111 __ set_constant_pool_allowed(true);
111 } 112 }
112 113
113 114
114 static Condition NegateCondition(Condition condition) { 115 static Condition NegateCondition(Condition condition) {
115 switch (condition) { 116 switch (condition) {
(...skipping 5494 matching lines...) Expand 10 before | Expand all | Expand 10 after
5610 1, 5611 1,
5611 locs()); 5612 locs());
5612 __ Drop(1); 5613 __ Drop(1);
5613 __ Pop(result); 5614 __ Pop(result);
5614 } 5615 }
5615 5616
5616 5617
5617 } // namespace dart 5618 } // namespace dart
5618 5619
5619 #endif // defined TARGET_ARCH_ARM64 5620 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698