Skip to content
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

Backport V8 fixes for WASM on ARM64 #39337

Closed
wants to merge 7 commits into from
Closed

Commits on Jul 10, 2021

  1. deps: V8: cherry-pick cb4faa902e9f

    Original commit message:
    
        Reland "[liftoff][arm64] Use 64 bit offset reg in mem op"
    
        This is a reland of f645d0b857bc669271adcbe95cf25e1554347dd4
    
        The issue was that converting an i64 to an i32 didn't clear the upper
        bits on arm64. This was not necessary before because we did the zero
        extension as part of the load operand, but this is required now that
        we use the full register.
    
        Original change's description:
        > [liftoff][arm64] Use 64 bit offset reg in mem op
        >
        > Accessing the Wasm memory with a 64 bit offset was truncated to 32 bit,
        > which is fine if we check bounds first, but not if we rely on the
        > trap handler to catch the OOB.
        >
        > R=clemensb@chromium.org
        >
        > Bug: v8:11587
        > Change-Id: I82a3a2906e55d9d640c30e770a5c93532e3a442c
        > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2808942
        > Reviewed-by: Clemens Backes <clemensb@chromium.org>
        > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
        > Cr-Commit-Position: refs/heads/master@{#73829}
    
        Bug: v8:11587
        Change-Id: Ibc182475745c6f697a0ba6d75c260b74ddf8fe52
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2810846
        Reviewed-by: Clemens Backes <clemensb@chromium.org>
        Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#73853}
    
    Refs: v8/v8@cb4faa9
    targos committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    1e25816 View commit details
    Browse the repository at this point in the history
  2. deps: V8: cherry-pick 53784bdb8f01

    Original commit message:
    
        [liftoff] Handle constant memory indexes specially
    
        This adds detection for constant memory indexes which can statically be
        proven to be in-bounds (because the effective offset is within the
        minimum memory size). In these cases, we can skip the bounds check and
        the out-of-line code for the trap-handler.
        This often saves 1-2% of code size.
    
        R=ahaas@chromium.org
    
        Bug: v8:11802
        Change-Id: I0ee094e6f1f5d132af1d6a8a7c539a4af6c3cb5e
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919827
        Commit-Queue: Clemens Backes <clemensb@chromium.org>
        Reviewed-by: Andreas Haas <ahaas@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#74825}
    
    Refs: v8/v8@53784bd
    targos committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    bb076a3 View commit details
    Browse the repository at this point in the history
  3. deps: V8: cherry-pick 2b77ca200c56

    Original commit message:
    
        [wasm][liftoff] Always zero-extend 32 bit offsets
    
        The upper 32 bits of the 64 bit offset register are not guaranteed to be
        cleared, so a zero-extension is needed. We already do the zero-extension
        in the case of explicit bounds checking, but this should also be done if
        the trap handler is enabled.
    
        R=clemensb@chromium.org
        CC=jkummerow@chromium.org
    
        Bug: v8:11809
        Change-Id: I21e2535c701041d11fa06c176fa683d82db0a3f1
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917612
        Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
        Reviewed-by: Clemens Backes <clemensb@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#74881}
    
    Refs: v8/v8@2b77ca2
    targos committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    9caa1bb View commit details
    Browse the repository at this point in the history
  4. deps: V8: cherry-pick 56fe020eec0c

    Original commit message:
    
        [wasm][arm64] Always zero-extend 32 bit offsets, for realz
    
        We've already been zero-extending 32-bit offset registers since
        https://chromium-review.googlesource.com/c/v8/v8/+/2917612,
        but that patch only covered the case where offset_imm == 0.
        When there is a non-zero offset, we need the same fix.
    
        Bug: chromium:1224882,v8:11809
        Change-Id: I1908f735929798f411346807fc4f3c79d8e04362
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2998582
        Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
        Reviewed-by: Clemens Backes <clemensb@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#75500}
    
    Refs: v8/v8@56fe020
    
    Fixes: nodejs#39327
    targos committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    e3ecfa6 View commit details
    Browse the repository at this point in the history
  5. deps: V8: cherry-pick 3805a698f7b6

    Original commit message:
    
        PPC/s390: [wasm][liftoff] Always zero-extend 32 bit offsets
    
        Port 2b77ca200c56667c68895e49c96c10ff77834f09
    
        Original Commit Message:
    
            The upper 32 bits of the 64 bit offset register are not guaranteed to be
            cleared, so a zero-extension is needed. We already do the zero-extension
            in the case of explicit bounds checking, but this should also be done if
            the trap handler is enabled.
    
        R=thibaudm@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
        BUG=
        LOG=N
    
        Change-Id: Ife3ae4f93b85fe1b2c76fe4b98fa408b5b51ed71
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2929661
        Reviewed-by: Junliang Yan <junyan@redhat.com>
        Commit-Queue: Milad Fa <mfarazma@redhat.com>
        Cr-Commit-Position: refs/heads/master@{#74886}
    
    Refs: v8/v8@3805a69
    targos committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    f9f5ff0 View commit details
    Browse the repository at this point in the history
  6. deps: V8: cherry-pick 359d44df4cdd

    Original commit message:
    
        [riscv64] Fix build failed
    
        Port 2b77ca200c56667c68895e49c96c10ff77834f09
    
        Change-Id: Ie953a1d54f5529423ae35d1b1cd3ca25e8101c6e
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2931577
        Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
        Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
        Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
        Cr-Commit-Position: refs/heads/master@{#74937}
    
    Refs: v8/v8@359d44d
    targos committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    6449112 View commit details
    Browse the repository at this point in the history
  7. deps: V8: backport 5c76da8ddcf8

    Original commit message:
    
        [mips][wasm][liftoff] Fix compile failed
    
        Port 2b77ca200c56667c68895e49c96c10ff77834f09
    
        Bug: v8:11809
    
        Change-Id: Idbbbc10d1339d6c8463686b6e701fb601a217cab
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2931557
        Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
        Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
        Auto-Submit: Liu yu <liuyu@loongson.cn>
        Cr-Commit-Position: refs/heads/master@{#74934}
    
    Refs: v8/v8@5c76da8
    targos committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    fad023d View commit details
    Browse the repository at this point in the history