Skip to content

cherry-pick V8 Linux s390x fixes for clang #59485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

richardlau
Copy link
Member

@richardlau richardlau commented Aug 15, 2025

Cherry-pick these two upstream V8 fixes for Linux s390x when building with clang (thanks @miladfarca for the list):

Refs: nodejs/build#4091
Refs: nodejs/build#4123 (comment)


Without these patches, building with clang fails:

15:19:17 <inline asm>:7:13: error: invalid register
15:19:17     7 |   stmg %r6, %sp, 48(%sp)                           
15:19:17       |             ^
15:19:17 <inline asm>:8:7: error: invalid register
15:19:17     8 |   lay %sp, -160(%sp)                               
15:19:17       |       ^
15:19:17 <inline asm>:10:16: error: invalid register
15:19:17    10 |   lay %r4, 208(%sp)                                
15:19:17       |                ^
15:19:17 <inline asm>:12:12: error: invalid register
15:19:17    12 |   lmg %r14,%sp, 272(%sp)                           
15:19:17       |            ^

and passes with this PR.

Milad Fa added 2 commits August 15, 2025 15:41
Original commit message:

    [liftoff] Fix parameter passing during CallC

    Values smaller than 8 bytes need to be sign/zero extended to
    8 bytes then pushed on to the stack.

    Change-Id: I5c9a2179ef2b65cf08b7e773180d78b252c2253f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6597365
    Commit-Queue: Milad Farazmand <[email protected]>
    Reviewed-by: Junliang Yan <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#100578}

Refs: v8/v8@59d52e3
Original commit message:

    s390: use %r15 instead of %sp

    Some compilers do not recognize %sp and output:
    ```
    error: invalid register
    ```

    Change-Id: I2e1b64dd0e799a03afccbd12f5b2db17b3130e07
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6603554
    Reviewed-by: Michael Lippautz <[email protected]>
    Commit-Queue: Milad Farazmand <[email protected]>
    Reviewed-by: Junliang Yan <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#100576}

Refs: v8/v8@7b91e3e
@richardlau richardlau added v8 engine Issues and PRs related to the V8 dependency. s390 Issues and PRs related to the s390 architecture. labels Aug 15, 2025
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels Aug 15, 2025
@richardlau richardlau added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Aug 15, 2025
@richardlau richardlau changed the title backport V8 Linux s390x fixes for clang cherry-pick V8 Linux s390x fixes for clang Aug 15, 2025
@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 15, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 15, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@richardlau richardlau added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 16, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 17, 2025
@nodejs-github-bot
Copy link
Collaborator

Landed in 3fc7019...eda6d33

nodejs-github-bot pushed a commit that referenced this pull request Aug 17, 2025
Original commit message:

    [liftoff] Fix parameter passing during CallC

    Values smaller than 8 bytes need to be sign/zero extended to
    8 bytes then pushed on to the stack.

    Change-Id: I5c9a2179ef2b65cf08b7e773180d78b252c2253f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6597365
    Commit-Queue: Milad Farazmand <[email protected]>
    Reviewed-by: Junliang Yan <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#100578}

Refs: v8/v8@59d52e3
PR-URL: #59485
Refs: nodejs/build#4091
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Aug 17, 2025
Original commit message:

    s390: use %r15 instead of %sp

    Some compilers do not recognize %sp and output:
    ```
    error: invalid register
    ```

    Change-Id: I2e1b64dd0e799a03afccbd12f5b2db17b3130e07
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6603554
    Reviewed-by: Michael Lippautz <[email protected]>
    Commit-Queue: Milad Farazmand <[email protected]>
    Reviewed-by: Junliang Yan <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#100576}

Refs: v8/v8@7b91e3e
PR-URL: #59485
Refs: nodejs/build#4091
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
panva pushed a commit to panva/node that referenced this pull request Aug 18, 2025
Original commit message:

    [liftoff] Fix parameter passing during CallC

    Values smaller than 8 bytes need to be sign/zero extended to
    8 bytes then pushed on to the stack.

    Change-Id: I5c9a2179ef2b65cf08b7e773180d78b252c2253f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6597365
    Commit-Queue: Milad Farazmand <[email protected]>
    Reviewed-by: Junliang Yan <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#100578}

Refs: v8/v8@59d52e3
PR-URL: nodejs#59485
Refs: nodejs/build#4091
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
panva pushed a commit to panva/node that referenced this pull request Aug 18, 2025
Original commit message:

    s390: use %r15 instead of %sp

    Some compilers do not recognize %sp and output:
    ```
    error: invalid register
    ```

    Change-Id: I2e1b64dd0e799a03afccbd12f5b2db17b3130e07
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6603554
    Reviewed-by: Michael Lippautz <[email protected]>
    Commit-Queue: Milad Farazmand <[email protected]>
    Reviewed-by: Junliang Yan <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#100576}

Refs: v8/v8@7b91e3e
PR-URL: nodejs#59485
Refs: nodejs/build#4091
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
targos pushed a commit that referenced this pull request Aug 21, 2025
Original commit message:

    [liftoff] Fix parameter passing during CallC

    Values smaller than 8 bytes need to be sign/zero extended to
    8 bytes then pushed on to the stack.

    Change-Id: I5c9a2179ef2b65cf08b7e773180d78b252c2253f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6597365
    Commit-Queue: Milad Farazmand <[email protected]>
    Reviewed-by: Junliang Yan <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#100578}

Refs: v8/v8@59d52e3
PR-URL: #59485
Refs: nodejs/build#4091
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
targos pushed a commit that referenced this pull request Aug 21, 2025
Original commit message:

    s390: use %r15 instead of %sp

    Some compilers do not recognize %sp and output:
    ```
    error: invalid register
    ```

    Change-Id: I2e1b64dd0e799a03afccbd12f5b2db17b3130e07
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6603554
    Reviewed-by: Michael Lippautz <[email protected]>
    Commit-Queue: Milad Farazmand <[email protected]>
    Reviewed-by: Junliang Yan <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#100576}

Refs: v8/v8@7b91e3e
PR-URL: #59485
Refs: nodejs/build#4091
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. needs-ci PRs that need a full CI run. s390 Issues and PRs related to the s390 architecture. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants