Index: runtime/vm/locations.cc |
=================================================================== |
--- runtime/vm/locations.cc (revision 7882) |
+++ runtime/vm/locations.cc (working copy) |
@@ -25,7 +25,7 @@ |
void LocationSummary::AllocateRegisters() { |
EmbeddedArray<bool, kNumberOfCpuRegisters> blocked_registers; |
- // Mark all registers free. |
+ // Mark all available registers free. |
for (intptr_t i = 0; i < kNumberOfCpuRegisters; i++) { |
blocked_registers[i] = false; |
} |
@@ -39,6 +39,12 @@ |
} |
} |
+ // Do not allocate known registers. |
+ blocked_registers[CTX] = true; |
+ if (TMP != kNoRegister) { |
+ blocked_registers[TMP] = true; |
+ } |
+ |
// Allocate all unallocated input locations. |
for (intptr_t i = 0; i < count(); i++) { |
Location loc = in(i); |