Skip to content

Commit 3f09a6d

Browse files
luyahandanielleadams
authored andcommitted
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 <[email protected]> Commit-Queue: ji qiu <[email protected]> Cr-Commit-Position: refs/heads/main@{#78421} Refs: v8/v8@b663343 PR-URL: #42067 Refs: v8/v8@77d5154 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Mary Marchini <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Stewart X Addison <[email protected]>
1 parent a70a1ce commit 3f09a6d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ namespace internal {
2323
* This assembler uses the following register assignment convention
2424
* - s3 : kScratchReg. Temporarily stores the index of capture start after a matching pass
2525
* for a global regexp.
26-
* - a5 : Pointer to current Code object including heap object tag.
27-
* - a6 : Current position in input, as negative offset from end of string.
26+
* - s4 : Pointer to current Code object including heap object tag.
27+
* - s1 : Current position in input, as negative offset from end of string.
2828
* Please notice that this is the byte offset, not the character offset!
29-
* - a7 : Currently loaded character. Must be loaded using
29+
* - s2 : Currently loaded character. Must be loaded using
3030
* LoadCurrentCharacter before using any of the dispatch methods.
3131
* - t0 : Points to tip of backtrack stack
3232
* - t1 : Unused.

deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerRISCV
144144

145145
// Register holding the current input position as negative offset from
146146
// the end of the string.
147-
inline Register current_input_offset() { return a6; }
147+
inline Register current_input_offset() { return s1; }
148148

149149
// The register containing the current character after LoadCurrentCharacter.
150-
inline Register current_character() { return a7; }
150+
inline Register current_character() { return s2; }
151151

152152
// Register holding address of the end of the input string.
153153
inline Register end_of_input_address() { return t2; }
@@ -161,7 +161,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerRISCV
161161
inline Register backtrack_stackpointer() { return t0; }
162162

163163
// Register holding pointer to the current code object.
164-
inline Register code_pointer() { return a5; }
164+
inline Register code_pointer() { return s4; }
165165

166166
// Byte size of chars in the string to match (decided by the Mode argument).
167167
inline int char_size() { return static_cast<int>(mode_); }

0 commit comments

Comments
 (0)