Chromium Code Reviews| Index: src/mips/deoptimizer-mips.cc |
| diff --git a/src/mips/deoptimizer-mips.cc b/src/mips/deoptimizer-mips.cc |
| index 5723136c84ecbfb52ebe9ccf9200b53f19736ec2..5e444c24a97578e120d41b1a0b9bd8b1bf0a1061 100644 |
| --- a/src/mips/deoptimizer-mips.cc |
| +++ b/src/mips/deoptimizer-mips.cc |
| @@ -320,39 +320,33 @@ void Deoptimizer::EntryGenerator::Generate() { |
| // Maximum size of a table entry generated below. |
| -const int Deoptimizer::table_entry_size_ = 7 * Assembler::kInstrSize; |
| +const int Deoptimizer::table_entry_size_ = 4 * Assembler::kInstrSize; |
|
dusmil
2014/07/11 10:47:14
Real size now is 2 instructions.
kilvadyb
2014/07/11 12:06:05
Done.
|
| void Deoptimizer::TableEntryGenerator::GeneratePrologue() { |
| Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm()); |
| // Create a sequence of deoptimization entries. |
| // Note that registers are still live when jumping to an entry. |
| - Label table_start; |
| + Label table_start, done; |
| __ bind(&table_start); |
| for (int i = 0; i < count(); i++) { |
| Label start; |
| __ bind(&start); |
| - __ addiu(sp, sp, -1 * kPointerSize); |
| - // Jump over the remaining deopt entries (including this one). |
| - // This code is always reached by calling Jump, which puts the target (label |
| - // start) into t9. |
| - const int remaining_entries = (count() - i) * table_entry_size_; |
| - __ Addu(t9, t9, remaining_entries); |
| - // 'at' was clobbered so we can only load the current entry value here. |
| - __ li(at, i); |
| - __ jr(t9); // Expose delay slot. |
| - __ sw(at, MemOperand(sp, 0 * kPointerSize)); // In the delay slot. |
| + ASSERT(is_int16(i)); |
| + __ Branch(USE_DELAY_SLOT, &done); // Expose delay slot. |
| + __ li(at, i); // In the delay slot. |
| // Pad the rest of the code. |
|
dusmil
2014/07/11 10:47:14
We can remove padding when size is changed.
kilvadyb
2014/07/11 12:06:05
Done.
|
| while (table_entry_size_ > (masm()->SizeOfCodeGeneratedSince(&start))) { |
| __ nop(); |
| } |
| - |
| ASSERT_EQ(table_entry_size_, masm()->SizeOfCodeGeneratedSince(&start)); |
| } |
| ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), |
| count() * table_entry_size_); |
| + __ bind(&done); |
| + __ Push(at); |
| } |