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

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

Issue 14605006: Allows "Hello, world!" to run on ARM hardware. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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) 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 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 // TODO(vegorov): consider saving only caller save (volatile) registers. 1186 // TODO(vegorov): consider saving only caller save (volatile) registers.
1187 const intptr_t fpu_registers = locs->live_registers()->fpu_registers(); 1187 const intptr_t fpu_registers = locs->live_registers()->fpu_registers();
1188 if (fpu_registers > 0) { 1188 if (fpu_registers > 0) {
1189 UNIMPLEMENTED(); 1189 UNIMPLEMENTED();
1190 } 1190 }
1191 1191
1192 // Store general purpose registers with the lowest register number at the 1192 // Store general purpose registers with the lowest register number at the
1193 // lowest address. 1193 // lowest address.
1194 const intptr_t cpu_registers = locs->live_registers()->cpu_registers(); 1194 const intptr_t cpu_registers = locs->live_registers()->cpu_registers();
1195 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0); 1195 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0);
1196 __ PushList(cpu_registers); 1196 if (cpu_registers != 0) {
1197 __ PushList(cpu_registers);
1198 }
1197 } 1199 }
1198 1200
1199 1201
1200 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { 1202 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
1201 // General purpose registers have the lowest register number at the 1203 // General purpose registers have the lowest register number at the
1202 // lowest address. 1204 // lowest address.
1203 const intptr_t cpu_registers = locs->live_registers()->cpu_registers(); 1205 const intptr_t cpu_registers = locs->live_registers()->cpu_registers();
1204 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0); 1206 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0);
1205 __ PopList(cpu_registers); 1207 if (cpu_registers != 0) {
1208 __ PopList(cpu_registers);
1209 }
1206 1210
1207 const intptr_t fpu_registers = locs->live_registers()->fpu_registers(); 1211 const intptr_t fpu_registers = locs->live_registers()->fpu_registers();
1208 if (fpu_registers > 0) { 1212 if (fpu_registers > 0) {
1209 UNIMPLEMENTED(); 1213 UNIMPLEMENTED();
1210 } 1214 }
1211 } 1215 }
1212 1216
1213 1217
1214 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data, 1218 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data,
1215 Register class_id_reg, 1219 Register class_id_reg,
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1475 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1472 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex)); 1476 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex));
1473 } 1477 }
1474 1478
1475 1479
1476 #undef __ 1480 #undef __
1477 1481
1478 } // namespace dart 1482 } // namespace dart
1479 1483
1480 #endif // defined TARGET_ARCH_ARM 1484 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698