| Index: src/compiler/mips64/code-generator-mips64.cc
|
| diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc
|
| index d5b60e9669a41d6f266b8db18f855ca1ac8fceb8..5d0f473fff0762c43c5be449925259ce2187cf8b 100644
|
| --- a/src/compiler/mips64/code-generator-mips64.cc
|
| +++ b/src/compiler/mips64/code-generator-mips64.cc
|
| @@ -1791,27 +1791,15 @@ void CodeGenerator::AssembleArchLookupSwitch(Instruction* instr) {
|
| AssembleArchJump(i.InputRpo(1));
|
| }
|
|
|
| -
|
| void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) {
|
| MipsOperandConverter i(this, instr);
|
| Register input = i.InputRegister(0);
|
| size_t const case_count = instr->InputCount() - 2;
|
| - Label here;
|
|
|
| __ Branch(GetLabel(i.InputRpo(1)), hs, input, Operand(case_count));
|
| - __ BlockTrampolinePoolFor(static_cast<int>(case_count) * 2 + 7);
|
| - // Ensure that dd-ed labels use 8 byte aligned addresses.
|
| - __ Align(8);
|
| - __ bal(&here);
|
| - __ dsll(at, input, 3); // Branch delay slot.
|
| - __ bind(&here);
|
| - __ daddu(at, at, ra);
|
| - __ ld(at, MemOperand(at, 4 * v8::internal::Assembler::kInstrSize));
|
| - __ jr(at);
|
| - __ nop(); // Branch delay slot nop.
|
| - for (size_t index = 0; index < case_count; ++index) {
|
| - __ dd(GetLabel(i.InputRpo(index + 2)));
|
| - }
|
| + __ GenerateSwitchTable(input, case_count, [&i, this](size_t index) {
|
| + return GetLabel(i.InputRpo(index + 2));
|
| + });
|
| }
|
|
|
|
|
|
|