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

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

Issue 311903004: Fixes to run "Hello, world!" on arm64 hardware. (Closed) Base URL: http://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
« no previous file with comments | « runtime/vm/disassembler_arm64.cc ('k') | runtime/vm/isolate.h » ('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) 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // that will be overwritten by the patch instructions: a branch macro sequence. 82 // that will be overwritten by the patch instructions: a branch macro sequence.
83 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 83 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
84 const Register result = locs()->in(0).reg(); 84 const Register result = locs()->in(0).reg();
85 ASSERT(result == R0); 85 ASSERT(result == R0);
86 #if defined(DEBUG) 86 #if defined(DEBUG)
87 Label stack_ok; 87 Label stack_ok;
88 __ Comment("Stack Check"); 88 __ Comment("Stack Check");
89 const intptr_t fp_sp_dist = 89 const intptr_t fp_sp_dist =
90 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize; 90 (kFirstLocalSlotFromFp + 1 - compiler->StackSize()) * kWordSize;
91 ASSERT(fp_sp_dist <= 0); 91 ASSERT(fp_sp_dist <= 0);
92 // UXTX 0 on a 64-bit register (FP) is a nop, but forces R31 to be 92 __ sub(R2, SP, Operand(FP));
93 // interpreted as SP.
94 __ sub(R2, SP, Operand(FP, UXTX, 0));
95 __ CompareImmediate(R2, fp_sp_dist, PP); 93 __ CompareImmediate(R2, fp_sp_dist, PP);
96 __ b(&stack_ok, EQ); 94 __ b(&stack_ok, EQ);
97 __ hlt(0); 95 __ hlt(0);
98 __ Bind(&stack_ok); 96 __ Bind(&stack_ok);
99 #endif 97 #endif
100 __ LeaveDartFrame(); 98 __ LeaveDartFrame();
101 __ ret(); 99 __ ret();
102 } 100 }
103 101
104 102
(...skipping 5228 matching lines...) Expand 10 before | Expand all | Expand 10 after
5333 compiler->GenerateCall(token_pos(), 5331 compiler->GenerateCall(token_pos(),
5334 &label, 5332 &label,
5335 PcDescriptors::kOther, 5333 PcDescriptors::kOther,
5336 locs()); 5334 locs());
5337 __ Drop(ArgumentCount()); // Discard arguments. 5335 __ Drop(ArgumentCount()); // Discard arguments.
5338 } 5336 }
5339 5337
5340 } // namespace dart 5338 } // namespace dart
5341 5339
5342 #endif // defined TARGET_ARCH_ARM64 5340 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/disassembler_arm64.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698