Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: src/compiler/arm/code-generator-arm.cc

Issue 1014093005: [turbofan] Emit constant pool before blocking it in AssembleArchTableSwitch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698