Skip to content

Commit 913a642

Browse files
luyahanxtx1130
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: nodejs#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 0987bf7 commit 913a642

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.13',
39+
'v8_embedder_string': '-node.14',
4040

4141
##### V8 defaults for Node.js #####
4242

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
@@ -155,10 +155,10 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerRISCV
155155

156156
// Register holding the current input position as negative offset from
157157
// the end of the string.
158-
static constexpr Register current_input_offset() { return a6; }
158+
static constexpr Register current_input_offset() { return s1; }
159159

160160
// The register containing the current character after LoadCurrentCharacter.
161-
static constexpr Register current_character() { return a7; }
161+
static constexpr Register current_character() { return s2; }
162162

163163
// Register holding address of the end of the input string.
164164
static constexpr Register end_of_input_address() { return t2; }
@@ -172,7 +172,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerRISCV
172172
static constexpr Register backtrack_stackpointer() { return t0; }
173173

174174
// Register holding pointer to the current code object.
175-
static constexpr Register code_pointer() { return a5; }
175+
static constexpr Register code_pointer() { return s4; }
176176

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

0 commit comments

Comments
 (0)