Skip to content

Commit

Permalink
deps: V8: cherry-pick b66334313c8b
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
luyahan authored and nodejs-github-bot committed Feb 25, 2022
1 parent 1b47866 commit 92d6c40
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

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

##### V8 defaults for Node.js #####

Expand Down
6 changes: 3 additions & 3 deletions deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions deps/v8/src/regexp/riscv64/regexp-macro-assembler-riscv64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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_); }
Expand Down

0 comments on commit 92d6c40

Please sign in to comment.