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

Unified Diff: src/arm64/regexp-macro-assembler-arm64.cc

Issue 370553002: ARM64: use direct conditional branches for regexp (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/regexp-macro-assembler-arm64.cc
diff --git a/src/arm64/regexp-macro-assembler-arm64.cc b/src/arm64/regexp-macro-assembler-arm64.cc
index 6896704154347abf5fec8040f0e1a8269d0b5dfc..762a7f1c5884060e20d5af0c46a9371c59925d82 100644
--- a/src/arm64/regexp-macro-assembler-arm64.cc
+++ b/src/arm64/regexp-macro-assembler-arm64.cc
@@ -1461,12 +1461,7 @@ void RegExpMacroAssemblerARM64::BranchOrBacktrack(Condition condition,
if (to == NULL) {
to = &backtrack_label_;
}
- // TODO(ulan): do direct jump when jump distance is known and fits in imm19.
- Condition inverted_condition = NegateCondition(condition);
- Label no_branch;
- __ B(inverted_condition, &no_branch);
- __ B(to);
- __ Bind(&no_branch);
+ __ B(condition, to);
}
void RegExpMacroAssemblerARM64::CompareAndBranchOrBacktrack(Register reg,
@@ -1477,15 +1472,11 @@ void RegExpMacroAssemblerARM64::CompareAndBranchOrBacktrack(Register reg,
if (to == NULL) {
to = &backtrack_label_;
}
- // TODO(ulan): do direct jump when jump distance is known and fits in imm19.
- Label no_branch;
if (condition == eq) {
- __ Cbnz(reg, &no_branch);
+ __ Cbz(reg, to);
} else {
- __ Cbz(reg, &no_branch);
+ __ Cbnz(reg, to);
}
- __ B(to);
- __ Bind(&no_branch);
} else {
__ Cmp(reg, immediate);
BranchOrBacktrack(condition, to);
« 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