| Index: src/compiler/arm/code-generator-arm.cc
|
| diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc
|
| index 57a21576341f7db4e5fc12b1a003457ab30769fe..830e040c5f0f46f7a9d559acbc987674f8c5581e 100644
|
| --- a/src/compiler/arm/code-generator-arm.cc
|
| +++ b/src/compiler/arm/code-generator-arm.cc
|
| @@ -854,13 +854,14 @@ void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) {
|
| ArmOperandConverter i(this, instr);
|
| Register input = i.InputRegister(0);
|
| size_t const case_count = instr->InputCount() - 2;
|
| + // Ensure to emit the constant pool first if necessary.
|
| __ CheckConstPool(true, true);
|
| __ cmp(input, Operand(case_count));
|
| __ BlockConstPoolFor(case_count + 2);
|
| - __ ldr(pc, MemOperand(pc, input, LSL, 2), lo);
|
| + __ add(pc, pc, Operand(input, LSL, 2), LeaveCC, lo);
|
| __ b(GetLabel(i.InputRpo(1)));
|
| for (size_t index = 0; index < case_count; ++index) {
|
| - __ dd(GetLabel(i.InputRpo(index + 2)));
|
| + __ b(GetLabel(i.InputRpo(index + 2)));
|
| }
|
| }
|
|
|
|
|