OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 __ b(eq, GetLabel(i.InputRpo(index + 1))); | 795 __ b(eq, GetLabel(i.InputRpo(index + 1))); |
796 } | 796 } |
797 AssembleArchJump(i.InputRpo(1)); | 797 AssembleArchJump(i.InputRpo(1)); |
798 } | 798 } |
799 | 799 |
800 | 800 |
801 void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) { | 801 void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) { |
802 ArmOperandConverter i(this, instr); | 802 ArmOperandConverter i(this, instr); |
803 Register input = i.InputRegister(0); | 803 Register input = i.InputRegister(0); |
804 size_t const case_count = instr->InputCount() - 2; | 804 size_t const case_count = instr->InputCount() - 2; |
| 805 __ CheckConstPool(true, true); |
805 __ cmp(input, Operand(case_count)); | 806 __ cmp(input, Operand(case_count)); |
806 __ BlockConstPoolFor(case_count + 2); | 807 __ BlockConstPoolFor(case_count + 2); |
807 __ ldr(pc, MemOperand(pc, input, LSL, 2), lo); | 808 __ ldr(pc, MemOperand(pc, input, LSL, 2), lo); |
808 __ b(GetLabel(i.InputRpo(1))); | 809 __ b(GetLabel(i.InputRpo(1))); |
809 for (size_t index = 0; index < case_count; ++index) { | 810 for (size_t index = 0; index < case_count; ++index) { |
810 __ dd(GetLabel(i.InputRpo(index + 2))); | 811 __ dd(GetLabel(i.InputRpo(index + 2))); |
811 } | 812 } |
812 } | 813 } |
813 | 814 |
814 | 815 |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 } | 1102 } |
1102 } | 1103 } |
1103 MarkLazyDeoptSite(); | 1104 MarkLazyDeoptSite(); |
1104 } | 1105 } |
1105 | 1106 |
1106 #undef __ | 1107 #undef __ |
1107 | 1108 |
1108 } // namespace compiler | 1109 } // namespace compiler |
1109 } // namespace internal | 1110 } // namespace internal |
1110 } // namespace v8 | 1111 } // namespace v8 |
OLD | NEW |