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

Unified Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 299833011: ARM mint cleanups (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_arm.cc
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index 17253e2f43c0b24b0e69b9939a7b2066a256c5c8..9c68a6210f7f811e0ffc688682f1dd976551d0de 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -1447,7 +1447,10 @@ void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
}
// Store general purpose registers with the highest register number at the
- // lowest address.
+ // lowest address. The order in which the registers are pushed must match the
+ // order in which the registers are encoded in the safe point's stack map.
+ // NOTE: Using ARM's multi-register push, pushes the registers in the wrong
+ // order.
for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) {
Register reg = static_cast<Register>(reg_idx);
if (locs->live_registers()->ContainsRegister(reg)) {
@@ -1459,7 +1462,8 @@ void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
// General purpose registers have the highest register number at the
- // lowest address.
+ // lowest address. The order in which the registers are popped must match the
+ // order in which the registers are pushed in SaveLiveRegisters.
for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) {
Register reg = static_cast<Register>(reg_idx);
if (locs->live_registers()->ContainsRegister(reg)) {
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698