diff options
author | Lu Yahan <yahan@iscas.ac.cn> | 2022-02-21 06:25:31 +0300 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2022-02-25 18:28:37 +0300 |
commit | 92d6c40ae88a99759809f7d7763f0e5a6dc3ac0d (patch) | |
tree | dd5b93ff655ff3b5c7e88900700b84238f21404e /deps | |
parent | 1b47866a1d94224678ce05e7c7355ff17ad9cce6 (diff) |
deps: V8: cherry-pick b66334313c8b
Original commit message:
[riscv64] use callee save register in regexp
Bug: v8:12502
Change-Id: I8d1b599fc945e276b70901953368768594470204
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3343861
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#78421}
Refs: https://github.com/v8/v8/commit/b66334313c8bd73b253d0779f59f3e8656967043
PR-URL: https://github.com/nodejs/node/pull/42067
Refs: https://github.com/v8/v8/commit/77d515484864984f721d6726610f314982ac44d2
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc | 6 | ||||
-rw-r--r-- | deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc index cc527a5432e..dda2104feb3 100644 --- a/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc +++ b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc @@ -23,10 +23,10 @@ namespace internal { * This assembler uses the following register assignment convention * - s3 : kScratchReg. Temporarily stores the index of capture start after a matching pass * for a global regexp. - * - a5 : Pointer to current Code object including heap object tag. - * - a6 : Current position in input, as negative offset from end of string. + * - s4 : Pointer to current Code object including heap object tag. + * - s1 : Current position in input, as negative offset from end of string. * Please notice that this is the byte offset, not the character offset! - * - a7 : Currently loaded character. Must be loaded using + * - s2 : Currently loaded character. Must be loaded using * LoadCurrentCharacter before using any of the dispatch methods. * - t0 : Points to tip of backtrack stack * - t1 : Unused. diff --git a/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h index 4692b678141..121569849a6 100644 --- a/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h +++ b/deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h @@ -155,10 +155,10 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerRISCV // Register holding the current input position as negative offset from // the end of the string. - static constexpr Register current_input_offset() { return a6; } + static constexpr Register current_input_offset() { return s1; } // The register containing the current character after LoadCurrentCharacter. - static constexpr Register current_character() { return a7; } + static constexpr Register current_character() { return s2; } // Register holding address of the end of the input string. static constexpr Register end_of_input_address() { return t2; } @@ -172,7 +172,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerRISCV static constexpr Register backtrack_stackpointer() { return t0; } // Register holding pointer to the current code object. - static constexpr Register code_pointer() { return a5; } + static constexpr Register code_pointer() { return s4; } // Byte size of chars in the string to match (decided by the Mode argument). inline int char_size() const { return static_cast<int>(mode_); } |