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

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

Issue 392403002: ARM64: always restore regexp register cache after a C function call. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | test/mjsunit/regress/regress-regexp-nocase.js » ('j') | 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 762a7f1c5884060e20d5af0c46a9371c59925d82..88204ebcc5d2d6ae8a48c84c5cb8e1a562ff2dff 100644
--- a/src/arm64/regexp-macro-assembler-arm64.cc
+++ b/src/arm64/regexp-macro-assembler-arm64.cc
@@ -397,11 +397,14 @@ void RegExpMacroAssemblerARM64::CheckNotBackReferenceIgnoreCase(
}
// Check if function returned non-zero for success or zero for failure.
- CompareAndBranchOrBacktrack(x0, 0, eq, on_no_match);
+ // x0 is one of the registers used as a cache so it must be tested before
+ // the cache is restored.
+ __ Cmp(x0, 0);
+ __ PopCPURegList(cached_registers);
+ BranchOrBacktrack(eq, on_no_match);
+
// On success, increment position by length of capture.
__ Add(current_input_offset(), current_input_offset(), capture_length);
- // Reset the cached registers.
- __ PopCPURegList(cached_registers);
}
__ Bind(&fallthrough);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-regexp-nocase.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698