Index: src/a64/deoptimizer-a64.cc |
diff --git a/src/a64/deoptimizer-a64.cc b/src/a64/deoptimizer-a64.cc |
index 40e3191fe9018f67a3098791cb73f4b71ae8a18c..af1a48c6d2087fc214fd593f5c5a5a0a8deccc62 100644 |
--- a/src/a64/deoptimizer-a64.cc |
+++ b/src/a64/deoptimizer-a64.cc |
@@ -340,6 +340,9 @@ const int Deoptimizer::table_entry_size_ = 2 * kInstructionSize; |
void Deoptimizer::TableEntryGenerator::GeneratePrologue() { |
+ UseScratchRegisterScope temps(masm()); |
+ Register entry_id = temps.AcquireX(); |
+ |
// Create a sequence of deoptimization entries. |
// Note that registers are still live when jumping to an entry. |
Label done; |
@@ -354,15 +357,13 @@ void Deoptimizer::TableEntryGenerator::GeneratePrologue() { |
for (int i = 0; i < count(); i++) { |
int start = masm()->pc_offset(); |
USE(start); |
- __ movz(masm()->Tmp0(), i); |
+ __ movz(entry_id, i); |
__ b(&done); |
ASSERT(masm()->pc_offset() - start == table_entry_size_); |
} |
} |
__ Bind(&done); |
- // TODO(all): We need to add some kind of assertion to verify that Tmp0() |
- // is not clobbered by Push. |
- __ Push(masm()->Tmp0()); |
+ __ Push(entry_id); |
} |