From 49a7de4545bd37a0c9cc9fe4cc211301f494b59e Mon Sep 17 00:00:00 2001 From: "svenpanne@chromium.org" Date: Mon, 24 Mar 2014 10:41:33 +0000 Subject: [PATCH] Revert "A64: Now that we have veneers, fix a couple of branches to directly jump to their target." This reverts commit r20169, it heavily regresses a Mozilla test: make -j32 arm64.release.check TESTFLAGS=--time TESTJOBS=mozilla/js1_5/Regress/regress-280769-2 Before: --- Total time: 00:01.928 --- 1 (00:01.911) mozilla/js1_5/Regress/regress-280769-2 2 (00:01.910) mozilla/js1_5/Regress/regress-280769-2 3 (00:01.910) mozilla/js1_5/Regress/regress-280769-2 After: --- Total time: 01:36.025 --- 1 (01:36.004) mozilla/js1_5/Regress/regress-280769-2 2 (01:35.403) mozilla/js1_5/Regress/regress-280769-2 3 (01:32.098) mozilla/js1_5/Regress/regress-280769-2 TBR=ulan@chromium.org Review URL: https://codereview.chromium.org/209333004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm64/regexp-macro-assembler-arm64.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/arm64/regexp-macro-assembler-arm64.cc b/src/arm64/regexp-macro-assembler-arm64.cc index 490facd..536580a 100644 --- a/src/arm64/regexp-macro-assembler-arm64.cc +++ b/src/arm64/regexp-macro-assembler-arm64.cc @@ -1481,7 +1481,12 @@ void RegExpMacroAssemblerARM64::BranchOrBacktrack(Condition condition, if (to == NULL) { to = &backtrack_label_; } - __ B(condition, to); + // 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); } void RegExpMacroAssemblerARM64::CompareAndBranchOrBacktrack(Register reg, @@ -1492,11 +1497,15 @@ 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) { - __ Cbz(reg, to); + __ Cbnz(reg, &no_branch); } else { - __ Cbnz(reg, to); + __ Cbz(reg, &no_branch); } + __ B(to); + __ Bind(&no_branch); } else { __ Cmp(reg, immediate); BranchOrBacktrack(condition, to); -- 2.7.4