Reviewers: ulan, jochen,
Description:
A64: Now that we have veneers, fix a couple of branches to directly jump to
their target.
Please review this at https://codereview.chromium.org/207883002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+3, -12 lines):
M src/a64/regexp-macro-assembler-a64.cc
Index: src/a64/regexp-macro-assembler-a64.cc
diff --git a/src/a64/regexp-macro-assembler-a64.cc
b/src/a64/regexp-macro-assembler-a64.cc
index
0b6ade8509f1510f0216182016f961a59c0c392f..06716e1723b435139da936ee9f3258cd29f3d1a7
100644
--- a/src/a64/regexp-macro-assembler-a64.cc
+++ b/src/a64/regexp-macro-assembler-a64.cc
@@ -1483,12 +1483,7 @@ void
RegExpMacroAssemblerA64::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 = InvertCondition(condition);
- Label no_branch;
- __ B(inverted_condition, &no_branch);
- __ B(to);
- __ Bind(&no_branch);
+ __ B(condition, to);
}
void RegExpMacroAssemblerA64::CompareAndBranchOrBacktrack(Register reg,
@@ -1499,15 +1494,11 @@ void
RegExpMacroAssemblerA64::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);
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.