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

Unified Diff: src/codegen-arm.cc

Issue 13290: Fixed bug in large switch tables on arm. (Closed)
Patch Set: Addressed review comments Created 12 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/assembler-arm.h ('k') | src/constants-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-arm.cc
diff --git a/src/codegen-arm.cc b/src/codegen-arm.cc
index 494257a6d397d72f1662c6fb99045e156389b255..712a98925c5a1b1c0be4adf9060edfa0f11eb92e 100644
--- a/src/codegen-arm.cc
+++ b/src/codegen-arm.cc
@@ -1347,15 +1347,7 @@ void CodeGenerator::GenerateFastCaseSwitchJumpTable(
__ b(ne, fail_label);
__ cmp(r0, Operand(Smi::FromInt(range)));
__ b(ge, fail_label);
- __ add(pc, pc, Operand(r0, LSL, 2 - kSmiTagSize));
- // One extra instruction offsets the table, so the table's start address is
- // the pc-register at the above add.
- __ stop("Unreachable: Switch table alignment");
-
- // Table containing branch operations.
- for (int i = 0; i < range; i++) {
- __ b(case_targets[i]);
- }
+ __ SmiJumpTable(r0, case_targets);
GenerateFastCaseSwitchCases(node, case_labels);
}
« no previous file with comments | « src/assembler-arm.h ('k') | src/constants-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698