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

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

Issue 311413002: Changes for running tests 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
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 __ sub(R2, SP, Operand(FP)); 92 __ sub(R2, SP, Operand(FP));
93 __ CompareImmediate(R2, fp_sp_dist, PP); 93 __ CompareImmediate(R2, fp_sp_dist, PP);
94 __ b(&stack_ok, EQ); 94 __ b(&stack_ok, EQ);
95 __ hlt(0); 95 __ brk(0);
96 __ Bind(&stack_ok); 96 __ Bind(&stack_ok);
97 #endif 97 #endif
98 __ LeaveDartFrame(); 98 __ LeaveDartFrame();
99 __ ret(); 99 __ ret();
100 } 100 }
101 101
102 102
103 static Condition NegateCondition(Condition condition) { 103 static Condition NegateCondition(Condition condition) {
104 switch (condition) { 104 switch (condition) {
105 case EQ: return NE; 105 case EQ: return NE;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 __ CompareObject(reg, Bool::False(), PP); 341 __ CompareObject(reg, Bool::False(), PP);
342 __ b(&done, EQ); 342 __ b(&done, EQ);
343 343
344 __ Push(reg); // Push the source object. 344 __ Push(reg); // Push the source object.
345 compiler->GenerateRuntimeCall(token_pos, 345 compiler->GenerateRuntimeCall(token_pos,
346 deopt_id, 346 deopt_id,
347 kNonBoolTypeErrorRuntimeEntry, 347 kNonBoolTypeErrorRuntimeEntry,
348 1, 348 1,
349 locs); 349 locs);
350 // We should never return here. 350 // We should never return here.
351 __ hlt(0); 351 __ brk(0);
352 __ Bind(&done); 352 __ Bind(&done);
353 } 353 }
354 354
355 355
356 void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 356 void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
357 const Register obj = locs()->in(0).reg(); 357 const Register obj = locs()->in(0).reg();
358 const Register result = locs()->out(0).reg(); 358 const Register result = locs()->out(0).reg();
359 359
360 EmitAssertBoolean(obj, token_pos(), deopt_id(), locs(), compiler); 360 EmitAssertBoolean(obj, token_pos(), deopt_id(), locs(), compiler);
361 ASSERT(obj == result); 361 ASSERT(obj == result);
(...skipping 4746 matching lines...) Expand 10 before | Expand all | Expand 10 after
5108 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kCall); 5108 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kCall);
5109 } 5109 }
5110 5110
5111 5111
5112 void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5112 void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5113 compiler->GenerateRuntimeCall(token_pos(), 5113 compiler->GenerateRuntimeCall(token_pos(),
5114 deopt_id(), 5114 deopt_id(),
5115 kThrowRuntimeEntry, 5115 kThrowRuntimeEntry,
5116 1, 5116 1,
5117 locs()); 5117 locs());
5118 __ hlt(0); 5118 __ brk(0);
5119 } 5119 }
5120 5120
5121 5121
5122 LocationSummary* ReThrowInstr::MakeLocationSummary(Isolate* isolate, 5122 LocationSummary* ReThrowInstr::MakeLocationSummary(Isolate* isolate,
5123 bool opt) const { 5123 bool opt) const {
5124 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kCall); 5124 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kCall);
5125 } 5125 }
5126 5126
5127 5127
5128 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5128 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5129 compiler->SetNeedsStacktrace(catch_try_index()); 5129 compiler->SetNeedsStacktrace(catch_try_index());
5130 compiler->GenerateRuntimeCall(token_pos(), 5130 compiler->GenerateRuntimeCall(token_pos(),
5131 deopt_id(), 5131 deopt_id(),
5132 kReThrowRuntimeEntry, 5132 kReThrowRuntimeEntry,
5133 2, 5133 2,
5134 locs()); 5134 locs());
5135 __ hlt(0); 5135 __ brk(0);
5136 } 5136 }
5137 5137
5138 5138
5139 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5139 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5140 if (!compiler->CanFallThroughTo(normal_entry())) { 5140 if (!compiler->CanFallThroughTo(normal_entry())) {
5141 __ b(compiler->GetJumpLabel(normal_entry())); 5141 __ b(compiler->GetJumpLabel(normal_entry()));
5142 } 5142 }
5143 } 5143 }
5144 5144
5145 5145
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
5322 compiler->GenerateCall(token_pos(), 5322 compiler->GenerateCall(token_pos(),
5323 &label, 5323 &label,
5324 PcDescriptors::kOther, 5324 PcDescriptors::kOther,
5325 locs()); 5325 locs());
5326 __ Drop(ArgumentCount()); // Discard arguments. 5326 __ Drop(ArgumentCount()); // Discard arguments.
5327 } 5327 }
5328 5328
5329 } // namespace dart 5329 } // namespace dart
5330 5330
5331 #endif // defined TARGET_ARCH_ARM64 5331 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698