Index: src/a64/deoptimizer-a64.cc |
diff --git a/src/a64/deoptimizer-a64.cc b/src/a64/deoptimizer-a64.cc |
index 66e501aeeba27bc6144882b0891e724ae1ada455..6748654a4ef7f97c453b410a545c2eff7117e8a6 100644 |
--- a/src/a64/deoptimizer-a64.cc |
+++ b/src/a64/deoptimizer-a64.cc |
@@ -338,6 +338,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; |
@@ -352,15 +355,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); |
} |