1. 13 Oct, 2020 30 commits
  2. 12 Oct, 2020 10 commits
    • Ng Zhi An's avatar
      [wasm-simd] Guard i64x2 widen i32x4 behind post-mvp flag · 62a16f14
      Ng Zhi An authored
      These are still not in proposal, so they should be behind the post-mvp
      flag.
      
      Bug: v8:10972
      Change-Id: I1b53307f334ddd8e21a095c13d7f7abb8ce05203
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2465654
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70463}
      62a16f14
    • Ng Zhi An's avatar
      [wasm-simd][x64] Don't force dst to be same as src on AVX · 813ae013
      Ng Zhi An authored
      On AVX, many instructions can have 3 operands, unlike SSE which only has
      2. So on SSE we use DefineSameAsFirst on the dst. But on AVX, using that
      will cause some unnecessary moves.
      
      This patch changes a couple of F32x4 and S128 instructions to remove
      this restriction when AVX is supported.
      
      We can't use AvxHelper since it duplicates the dst for the call to the
      AVX instruction, which isn't what we want. The alternative is to
      redefine Mulps and other functions here, but there are other callsites
      that depend on this duplicated-dst behavior, so it's harder to change.
      We can migrate this as we move more logic over to non-DefineSameAsFirst
      for AVX.
      
      With the meshopt_decoder.js in the linked bug, it removes 8 SIMD movs
      (from a function that has 300+ lines of assembly.)
      
      Note that from agner's microarchitecture.pdf, page 127, "Elimination of
      move instructions", many times such moves can be eliminated by the
      processor. So this change won't speed up perf, but it helps a bit with
      binary size, and decoder pressure.
      
      Bug: v8:10116,v8:9561
      Change-Id: I125bfd44e728ef08312620bc00f6433f376e69e3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2465653Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70462}
      813ae013
    • Ng Zhi An's avatar
      [wasm-simd][arm64] Prototype i8x16.popcnt · 102b4b3c
      Ng Zhi An authored
      This implements i8x16.popcnt on arm64 and interpreter.
      
      Bug: v8:11002
      Change-Id: Ia94a053d7e0a0c800057ac80865ba6f86ac7caf8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461058Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70461}
      102b4b3c
    • v8-ci-autoroll-builder's avatar
      Update V8 DEPS. · 1c6cd2ac
      v8-ci-autoroll-builder authored
      Rolling v8/build: https://chromium.googlesource.com/chromium/src/build/+log/7e6351e..3110f72
      
      TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com
      
      Change-Id: Iee2196a82440a19603db77170b8f224753ab5479
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2466562Reviewed-by: 's avatarv8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
      Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/master@{#70460}
      1c6cd2ac
    • Ng Zhi An's avatar
      [wasm-simd][x64] Prototype i64x2.bitmask · ceee7cfe
      Ng Zhi An authored
      Implement on interpreter and x64.
      
      Bug: v8:10997
      Change-Id: I3537ce54e1b56cc3b04d91cb07c430c35b88c3aa
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2459109
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70459}
      ceee7cfe
    • Zhi An Ng's avatar
      Revert "[csa] Fix semantics of PopAndReturn" · d813f56c
      Zhi An Ng authored
      This reverts commit 5e5eaf79.
      
      Reason for revert: Failure on V8 Linux gcc https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20gcc/8929?
      
      Original change's description:
      > [csa] Fix semantics of PopAndReturn
      >
      > This CL prohibits using PopAndReturn from the builtins that
      > have calling convention with arguments on the stack.
      >
      > This CL also updates the PopAndReturn tests so that even off-by-one
      > errors in the number of poped arguments are caught which was not the
      > case before.
      >
      > Motivation:
      >
      > PopAndReturn is supposed to be using ONLY in CSA/Torque builtins for
      > dropping ALL JS arguments that are currently located on the stack.
      > Disallowing PopAndReturn in builtins with stack arguments simplifies
      > semantics of this instruction because in case of presence of declared
      > stack parameters it's impossible to distinguish the following cases:
      > 1) stack parameter is included in JS arguments (and therefore it will
      >    be dropped as a part of 'pop' number of arguments),
      > 2) stack parameter is NOT included in JS arguments (and therefore it
      >    should be dropped in ADDITION to the 'pop' number of arguments).
      >
      > This issue wasn't noticed before because builtins with stack parameters
      > relied on adapter frames machinery to ensure that the expected
      > parameters are present on the stack, but on the same time the adapter
      > frame tearing down code was effectively recovering the stack pointer
      > potentially broken by the CSA builtin.
      >
      > Once we get rid of the arguments adapter frames keeping stack pointer
      > in a valid state becomes crucial.
      >
      > Bug: v8:5269, v8:10201
      > Change-Id: Id3ea9730bb0d41d17999c73136c4dfada374a822
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460819
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#70454}
      
      TBR=tebbi@chromium.org,ishell@chromium.org
      
      Change-Id: I2673982a8f51cbecf421af11b0ce5ad5031fb406
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:5269
      Bug: v8:10201
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2465656Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70458}
      d813f56c
    • Ng Zhi An's avatar
      Add --print-wasm-code-function-index · 3d48ae2d
      Ng Zhi An authored
      This flag allows you to filter printing Wasm code to one particular
      function index.
      
      Bug: v8:10791
      Change-Id: I400ccaadb8330e5e31e2faefdeddb169cdc85f71
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2459259
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70457}
      3d48ae2d
    • Ng Zhi An's avatar
      [wasm-simd][x64] Prototype load lane · 673be63e
      Ng Zhi An authored
      Load lane loads a value from memory and replaces a single lane of a
      simd value.
      
      This implements the load (no stores yet) for x64 and interpreter.
      
      Bug: v8:10975
      Change-Id: I95d1b5e781ee9adaec23dda749e514f2485eda10
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2444578
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70456}
      673be63e
    • Ng Zhi An's avatar
      [wasm-simd] Remove some I64x2 instructions not in proposal · 2c38a477
      Ng Zhi An authored
      These instructions are not in the proposal, and will be unlikely to be
      requested (poor performance, insufficient use cases). As we get more
      instruction suggestions, these are sitting around on useful opcodes and
      we have to play musical chairs every time we prototype a new
      instruction.
      
      Bug: v8:10933
      Change-Id: Ic7ce4e514c343d821f76b8c071e41f9bddfbd1ce
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2457669Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70455}
      2c38a477
    • Igor Sheludko's avatar
      [csa] Fix semantics of PopAndReturn · 5e5eaf79
      Igor Sheludko authored
      This CL prohibits using PopAndReturn from the builtins that
      have calling convention with arguments on the stack.
      
      This CL also updates the PopAndReturn tests so that even off-by-one
      errors in the number of poped arguments are caught which was not the
      case before.
      
      Motivation:
      
      PopAndReturn is supposed to be using ONLY in CSA/Torque builtins for
      dropping ALL JS arguments that are currently located on the stack.
      Disallowing PopAndReturn in builtins with stack arguments simplifies
      semantics of this instruction because in case of presence of declared
      stack parameters it's impossible to distinguish the following cases:
      1) stack parameter is included in JS arguments (and therefore it will
         be dropped as a part of 'pop' number of arguments),
      2) stack parameter is NOT included in JS arguments (and therefore it
         should be dropped in ADDITION to the 'pop' number of arguments).
      
      This issue wasn't noticed before because builtins with stack parameters
      relied on adapter frames machinery to ensure that the expected
      parameters are present on the stack, but on the same time the adapter
      frame tearing down code was effectively recovering the stack pointer
      potentially broken by the CSA builtin.
      
      Once we get rid of the arguments adapter frames keeping stack pointer
      in a valid state becomes crucial.
      
      Bug: v8:5269, v8:10201
      Change-Id: Id3ea9730bb0d41d17999c73136c4dfada374a822
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460819
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70454}
      5e5eaf79