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

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

Issue 14153004: Implement missing features to run Hello world! on simulated ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/dart.cc ('k') | runtime/vm/intermediate_language_arm.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) 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" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 __ b(&null_args_loop_condition); 655 __ b(&null_args_loop_condition);
656 __ Bind(&null_args_loop); 656 __ Bind(&null_args_loop);
657 __ str(IP, original_argument_addr); 657 __ str(IP, original_argument_addr);
658 __ Bind(&null_args_loop_condition); 658 __ Bind(&null_args_loop_condition);
659 __ subs(R8, R8, ShifterOperand(1)); 659 __ subs(R8, R8, ShifterOperand(1));
660 __ b(&null_args_loop, PL); 660 __ b(&null_args_loop, PL);
661 } 661 }
662 662
663 663
664 void FlowGraphCompiler::GenerateInlinedGetter(intptr_t offset) { 664 void FlowGraphCompiler::GenerateInlinedGetter(intptr_t offset) {
665 UNIMPLEMENTED(); 665 // LR: return address.
666 // SP: receiver.
667 // Sequence node has one return node, its input is load field node.
668 __ ldr(R0, Address(SP, 0 * kWordSize));
669 __ LoadFromOffset(kLoadWord, R0, R0, offset - kHeapObjectTag);
670 __ Ret();
666 } 671 }
667 672
668 673
669 void FlowGraphCompiler::GenerateInlinedSetter(intptr_t offset) { 674 void FlowGraphCompiler::GenerateInlinedSetter(intptr_t offset) {
670 UNIMPLEMENTED(); 675 // LR: return address.
676 // SP+1: receiver.
677 // SP+0: value.
678 // Sequence node has one store node and one return NULL node.
679 __ ldr(R0, Address(SP, 1 * kWordSize)); // Receiver.
680 __ ldr(R1, Address(SP, 0 * kWordSize)); // Value.
681 __ StoreIntoObject(R0, FieldAddress(R0, offset), R1);
682 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null()));
683 __ Ret();
671 } 684 }
672 685
673 686
674 void FlowGraphCompiler::EmitFrameEntry() { 687 void FlowGraphCompiler::EmitFrameEntry() {
675 const Function& function = parsed_function().function(); 688 const Function& function = parsed_function().function();
676 if (CanOptimizeFunction() && function.is_optimizable()) { 689 if (CanOptimizeFunction() && function.is_optimizable()) {
677 const bool can_optimize = !is_optimizing() || may_reoptimize(); 690 const bool can_optimize = !is_optimizing() || may_reoptimize();
678 const Register function_reg = R6; 691 const Register function_reg = R6;
679 if (can_optimize) { 692 if (can_optimize) {
680 // The pool pointer is not setup before entering the Dart frame. 693 // The pool pointer is not setup before entering the Dart frame.
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 intptr_t index) { 1107 intptr_t index) {
1095 UNIMPLEMENTED(); 1108 UNIMPLEMENTED();
1096 return FieldAddress(array, index); 1109 return FieldAddress(array, index);
1097 } 1110 }
1098 1111
1099 1112
1100 FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid, 1113 FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
1101 intptr_t index_scale, 1114 intptr_t index_scale,
1102 Register array, 1115 Register array,
1103 Register index) { 1116 Register index) {
1104 UNIMPLEMENTED(); 1117 UNREACHABLE(); // No register indexed with offset addressing mode on ARM.
1105 return FieldAddress(array, index); 1118 return FieldAddress(array, index);
1106 } 1119 }
1107 1120
1108 1121
1109 Address FlowGraphCompiler::ExternalElementAddressForIntIndex( 1122 Address FlowGraphCompiler::ExternalElementAddressForIntIndex(
1110 intptr_t index_scale, 1123 intptr_t index_scale,
1111 Register array, 1124 Register array,
1112 intptr_t index) { 1125 intptr_t index) {
1113 UNIMPLEMENTED(); 1126 UNIMPLEMENTED();
1114 return FieldAddress(array, index); 1127 return FieldAddress(array, index);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1319 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1307 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex)); 1320 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex));
1308 } 1321 }
1309 1322
1310 1323
1311 #undef __ 1324 #undef __
1312 1325
1313 } // namespace dart 1326 } // namespace dart
1314 1327
1315 #endif // defined TARGET_ARCH_ARM 1328 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698