1. 19 Jun, 2017 1 commit
  2. 13 Jun, 2017 1 commit
  3. 08 Jun, 2017 1 commit
    • bbudge's avatar
      [WASM] Eliminate SIMD boolean vector types. · 381f7da0
      bbudge authored
      - Eliminates b1x4, b1x8, and b1x16 as distinct WASM types.
      - All vector comparisons return v128 type.
      - Eliminates b1xN and, or, xor, not.
      - Selects take a v128 mask vector and are now bit-wise.
      - Adds a new test for Select, where mask is non-canonical (not 0's and -1's).
      
      LOG=N
      BUG=v8:6020
      
      Review-Url: https://codereview.chromium.org/2919203002
      Cr-Commit-Position: refs/heads/master@{#45795}
      381f7da0
  4. 22 May, 2017 1 commit
  5. 04 May, 2017 1 commit
  6. 03 May, 2017 1 commit
    • Clemens Hammacher's avatar
      [wasm] [interpreter] Ignore stack effects after unreachable · 4423c9cc
      Clemens Hammacher authored
      During computation of the side table, ignore stack effects of
      instructions following any unconditional jump in the same block
      (|unreachable|, |br|, |br_table| or |return| jump out of the block).
      Without this fix, the current stack height might underflow, or we compute an
      unnecessarily large max_stack_height_. Note that those instruction will
      never get executed anyway.
      Hence, we don't need to store any side table information for such
      unreachable code.
      
      R=rossberg@chromium.org
      BUG=chromium:716936, chromium:715990
      
      Change-Id: I282f7f18ba1b972a112210e692f6cd05cf32308c
      Reviewed-on: https://chromium-review.googlesource.com/493266Reviewed-by: 's avatarAndreas Rossberg <rossberg@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45059}
      4423c9cc
  7. 25 Apr, 2017 2 commits
    • Clemens Hammacher's avatar
      [wasm] Move wasm-macro-gen.h to test/common/wasm · fc6d4a1f
      Clemens Hammacher authored
      This header file is only used from tests.
      Also, move the LoadStoreOpcodeOf method (only used in tests) from
      wasm-opcodes.h to wasm-macro-gen.h.
      
      R=ahaas@chromium.org
      
      Change-Id: I8d4691be494b5c1fbe3084441329850930bad647
      Reviewed-on: https://chromium-review.googlesource.com/486861
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44845}
      fc6d4a1f
    • Clemens Hammacher's avatar
      [wasm] [interpreter] Precompute side table for breaks · 92bf8327
      Clemens Hammacher authored
      Instead of dynamically tracking the block nesting, precompute the
      information statically.
      The interpreter was already using a side table to store the pc diff for
      each break, conditional break and others. The information needed to
      adjust the stack was tracked dynamically, however. This CL also
      precomputes this information, as it is statically known.
      Instead of just storing the pc diff in the side table, we now store the
      pc diff, the stack height diff and the arity of the target block.
      
      Local measurements show speedups of 5-6% on average, sometimes >10%.
      
      R=ahaas@chromium.org
      BUG=v8:5822
      
      Change-Id: I986cfa989aabe1488f2ff79ddbfbb28aeffe1452
      Reviewed-on: https://chromium-review.googlesource.com/485482Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44837}
      92bf8327
  8. 24 Apr, 2017 2 commits
  9. 21 Apr, 2017 1 commit
    • bbudge's avatar
      [WASM SIMD] Remove opcodes that are slow on some platforms. · dddfcfd0
      bbudge authored
      These can be synthesized from existing operations and scheduled for
      better performance than if we have to generate blocks of instructions
      that take many cycles to complete.
      - Remove F32x4RecipRefine, F32x4RecipSqrtRefine. Clients are better off
        synthesizing these from splats, multiplies and adds.
      - Remove F32x4Div, F32x4Sqrt, F32x4MinNum, F32x4MaxNum. Clients are
        better off synthesizing these or using the reciprocal approximations,
        possibly with a refinement step.
      
      LOG=N
      BUG=v8:6020
      
      Review-Url: https://codereview.chromium.org/2827143002
      Cr-Commit-Position: refs/heads/master@{#44784}
      dddfcfd0
  10. 19 Apr, 2017 1 commit
    • bbudge's avatar
      [WASM SIMD] Implement primitive shuffles. · 5806d862
      bbudge authored
      - Adds unary Reverse shuffles (swizzles): S32x2Reverse, S16x4Reverse,
        S16x2Reverse, S8x8Reverse, S8x4Reverse, S8x2Reverse. Reversals are
        done within the sub-vectors that prefix the opcode name, e.g. S8x2
        reverses the 8 consecutive pairs in an S8x16 vector.
      
      - Adds binary Zip (interleave) left and right half-shuffles to return a
        single vector: S32x4ZipLeft, S32x4ZipRightS16x8ZipLeft, S16x8ZipRight,
        S8x16ZipLeft, S8x16ZipRight.
      
      - Adds binary Unzip (de-interleave) left and right half shuffles to return
        a single vector: S32x4UnzipLeft, S32x4UnzipRight, S16x8UnzipLeft,
        S16x8UnzipRight, S8x16UnzipLeft, S8x16UnzipRight.
      
      - Adds binary Transpose left and right half shuffles to return
        a single vector: S32x4TransposeLeft, S32x4TransposeRight,
        S16x8TransposeLeft, S16xTransposeRight, S8x16TransposeLeft,
        S8x16TransposeRight.
      
      - Adds binary Concat (concatenate) byte shuffle: S8x16Concat #bytes to
        paste two vectors together.
      
      LOG=N
      BUG=v8:6020
      
      Review-Url: https://codereview.chromium.org/2801183002
      Cr-Commit-Position: refs/heads/master@{#44734}
      5806d862
  11. 10 Apr, 2017 1 commit
    • bbudge's avatar
      [WASM SIMD] Implement packing and unpacking integer conversions. · dbfc0300
      bbudge authored
      - Adds WASM opcodes I32x4SConvertI16x8Low, I32x4SConvertI16x8High,
        I32x4UConvertI16x8Low, I32x4UConvertI16x8High, which unpack half of
        an I16x8 register into a whole I32x4 register, with signed or unsigned
        extension. Having separate Low/High opcodes works around the difficulty
        of having multiple output registers, which would be necessary if we unpacked
        the entire I16x8 register.
      
      - Adds WASM opcodes I16x8SConvertI8x16Low, I16x8SConvertI8x16High,
        I16x8UConvertI8x16Low, I16x8UConvertI8x16High, similarly to above.
      
      - Adds WASM opcodes I16x8SConvertI32x4, I16x8UConvertI32x4,
        I8x16SConvert16x8, I8x16UConvertI16x8, which pack two source registers
        into a single destination register with signed or unsigned saturation. These
        could have been separated into half operations, but this is simpler to
        implement with SSE, AVX, and is acceptable on ARM. It also avoids adding
        operations that only modify half of their destination register.
      
      - Implements these opcodes for ARM.
      
      LOG=N
      BUG=v8:6020
      
      Review-Url: https://codereview.chromium.org/2800523002
      Cr-Commit-Position: refs/heads/master@{#44541}
      dbfc0300
  12. 16 Mar, 2017 1 commit
  13. 15 Mar, 2017 1 commit
  14. 08 Mar, 2017 1 commit
    • bbudge's avatar
      [WASM] Implement remaining F32x4 operations for ARM. · 78382d72
      bbudge authored
      - Implements Float32x4 Mul, Min, Max for ARM.
      - Implements Float32x4 relational ops for ARM.
      - Implements reciprocal, reciprocal square root estimate/refinement ops for ARM.
      - Reorganizes tests to eliminate need for specialized float ref fns in tests.
      - Rephrases Gt, Ge in terms of Lt, Le, and eliminates the redundant machine
        operators.
      - Renames test-run-wasm-simd test names to match instructions.
      
      LOG=N
      BUG=v8:6020
      
      Review-Url: https://codereview.chromium.org/2729943002
      Cr-Commit-Position: refs/heads/master@{#43658}
      78382d72
  15. 02 Mar, 2017 2 commits
    • bbudge's avatar
      Implement remaining Boolean SIMD operations on ARM. · 386e5a11
      bbudge authored
      - Implements Select instructions using a single ARM vbsl instruction.
      - Renames boolean machine operators to match renamed S1xN machine types.
      - Implements S1xN vector logical ops, AND, OR, XOR, NOT for ARM.
      - Implements S1xN AnyTrue, AllTrue ops for ARM.
      - Eliminates unused SIMD op categories in opcodes.h.
      
      LOG=N
      BUG=v8:6020
      
      Review-Url: https://codereview.chromium.org/2711863002
      Cr-Commit-Position: refs/heads/master@{#43556}
      386e5a11
    • clemensh's avatar
      [wasm] Several unrelated cleanups · fa8dba0e
      clemensh authored
      Most are minor performance optimizations that aggregated while implementing
      other changes. Those fixes will probably not be visible in perf graphs, but
      they bothered me anyway.
      
      R=titzer@chromium.org, ahaas@chromium.org
      
      Review-Url: https://codereview.chromium.org/2714373003
      Cr-Commit-Position: refs/heads/master@{#43535}
      fa8dba0e
  16. 21 Feb, 2017 1 commit
    • bbudge's avatar
      [V8] Implement SIMD Boolean vector types to allow mask registers. · 9fe0b4c7
      bbudge authored
      - Adds new machine types SimdBool4/8/16 for the different boolean vector types.
      - Adds a kSimdMaskRegisters flag for each platform. These are all false for now.
      - Removes Create, ExtractLane, ReplaceLane, Equal, NotEqual, Swizzle and Shuffle
        opcodes from the Boolean types. These are unlikely to be well supported natively,
        and can be synthesized using Select.
      - Changes the signature of Relational opcodes to return boolean vectors.
      - Changes the signature of Select opcodes to take boolean vectors.
      - Updates the ARM implementation of Relational and Select opcodes.
      
      LOG=N
      BUG=v8:4124
      
      Review-Url: https://codereview.chromium.org/2700813002
      Cr-Commit-Position: refs/heads/master@{#43348}
      9fe0b4c7
  17. 13 Feb, 2017 1 commit
    • bbudge's avatar
      [Turbofan] Add more non-arithmetic SIMD operations. · 11f88ef5
      bbudge authored
      - Renames select, swizzle, and shuffle to be consistent with the S128 and
        existing S32x4 ops, and reflect that these aren't arithmetic.
        e.g. I16x8Swizzle -> S16x8Swizzle.
      - Implements S16x8 and S8x16 Select operations and tests.
      - Implements S128And, Or, Xor, Not operations and tests.
      - Implements Swizzle for 32x4 formats.
      - Refactors test macros that generate SIMD code.
      
      TEST=cctest/test-run-wasm-simd/*
      
      LOG=N
      BUG=v8:4124
      
      Review-Url: https://codereview.chromium.org/2683713003
      Cr-Commit-Position: refs/heads/master@{#43168}
      11f88ef5
  18. 07 Feb, 2017 1 commit
  19. 02 Feb, 2017 1 commit
  20. 20 Jan, 2017 1 commit
  21. 09 Jan, 2017 1 commit
  22. 21 Dec, 2016 2 commits
  23. 19 Dec, 2016 1 commit
  24. 15 Dec, 2016 2 commits
    • ahaas's avatar
      [wasm] TrapIf and TrapUnless TurboFan operators implemented on ia32. · f435d622
      ahaas authored
      Original commit message:
      [wasm] Introduce the TrapIf and TrapUnless operators to generate trap code.
      
      Some instructions in WebAssembly trap for some inputs, which means that the
      execution is terminated and (at least at the moment) a JavaScript exception is
      thrown. Examples for traps are out-of-bounds memory accesses, or integer
      divisions by zero.
      
      Without the TrapIf and TrapUnless operators trap check in WebAssembly introduces 5
      TurboFan nodes (branch, if_true, if_false, trap-reason constant, trap-position
      constant), in addition to the trap condition itself. Additionally, each
      WebAssembly function has four TurboFan nodes (merge, effect_phi, 2 phis) whose
      number of inputs is linear to the number of trap checks in the function.
      Especially for functions with high numbers of trap checks we observe a
      significant slowdown in compilation time, down to 0.22 MiB/s in the sqlite
      benchmark instead of the average of 3 MiB/s in other benchmarks. By introducing
      a TrapIf common operator only a single node is necessary per trap check, in
      addition to the trap condition. Also the nodes which are shared between trap
      checks (merge, effect_phi, 2 phis) would disappear. First measurements suggest a
      speedup of 30-50% on average.
      
      This CL only implements TrapIf and TrapUnless on x64. The implementation is also
      hidden behind the --wasm-trap-if flag.
      
      Please take a special look at how the source position is transfered from the
      instruction selector to the code generator, and at the context that is used for
      the runtime call.
      
      R=titzer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2571813002
      Cr-Commit-Position: refs/heads/master@{#41735}
      f435d622
    • ahaas's avatar
      [wasm] Introduce the TrapIf and TrapUnless operators to generate trap code. · 7bd61b60
      ahaas authored
      Some instructions in WebAssembly trap for some inputs, which means that the
      execution is terminated and (at least at the moment) a JavaScript exception is
      thrown. Examples for traps are out-of-bounds memory accesses, or integer
      divisions by zero.
      
      Without the TrapIf and TrapUnless operators trap check in WebAssembly introduces 5
      TurboFan nodes (branch, if_true, if_false, trap-reason constant, trap-position
      constant), in addition to the trap condition itself. Additionally, each
      WebAssembly function has four TurboFan nodes (merge, effect_phi, 2 phis) whose
      number of inputs is linear to the number of trap checks in the function.
      Especially for functions with high numbers of trap checks we observe a
      significant slowdown in compilation time, down to 0.22 MiB/s in the sqlite
      benchmark instead of the average of 3 MiB/s in other benchmarks. By introducing
      a TrapIf common operator only a single node is necessary per trap check, in
      addition to the trap condition. Also the nodes which are shared between trap
      checks (merge, effect_phi, 2 phis) would disappear. First measurements suggest a
      speedup of 30-50% on average.
      
      This CL only implements TrapIf and TrapUnless on x64. The implementation is also
      hidden behind the --wasm-trap-if flag.
      
      Please take a special look at how the source position is transfered from the
      instruction selector to the code generator, and at the context that is used for
      the runtime call.
      
      R=titzer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2562393002
      Cr-Commit-Position: refs/heads/master@{#41720}
      7bd61b60
  25. 06 Dec, 2016 1 commit
  26. 02 Dec, 2016 1 commit
  27. 01 Dec, 2016 1 commit
  28. 26 Oct, 2016 2 commits
  29. 17 Oct, 2016 1 commit
  30. 27 Sep, 2016 1 commit
    • titzer's avatar
      [wasm] Master CL for Binary 0xC changes. · 28392ab1
      titzer authored
      [0xC] Convert to stack machine semantics.
      [0xC] Use section codes instead of names.
      [0xC] Add elements section decoding.
      [0xC] Decoding of globals section.
      [0xC] Decoding of memory section.
      [0xC] Decoding of imports section.
      [0xC] Decoding of exports section.
      [0xC] Decoding of data section.
      [0xC] Remove CallImport bytecode.
      [0xC] Function bodies have an implicit block.
      [0xC] Remove the bottom label from loops.
      [0xC] Add signatures to blocks.
      [0xC] Remove arities from branches.
      Add tests for init expression decoding.
      Rework compilation of import wrappers and how they are patched.
      Rework function indices in debugging.
      Fix ASM->WASM builder for stack machine.
      Reorganize asm.js foreign functions due to import indices change.
      
      R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9
      Review-Url: https://codereview.chromium.org/2345593003
      Cr-Original-Commit-Position: refs/heads/master@{#39678}
      Cr-Commit-Position: refs/heads/master@{#39795}
      28392ab1
  31. 23 Sep, 2016 2 commits
    • machenbach's avatar
      Revert of [wasm] Master CL for Binary 0xC changes. (patchset #26 id:490001 of... · e1eee748
      machenbach authored
      Revert of [wasm] Master CL for Binary 0xC changes. (patchset #26 id:490001 of https://codereview.chromium.org/2345593003/ )
      
      Reason for revert:
      Main suspect for tsan:
      https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11893
      
      Also changes layout tests:
      https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10036
      
      +mips builder:
      https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/4032
      
      Original issue's description:
      > [wasm] Master CL for Binary 0xC changes.
      >
      > [0xC] Convert to stack machine semantics.
      > [0xC] Use section codes instead of names.
      > [0xC] Add elements section decoding.
      > [0xC] Decoding of globals section.
      > [0xC] Decoding of memory section.
      > [0xC] Decoding of imports section.
      > [0xC] Decoding of exports section.
      > [0xC] Decoding of data section.
      > [0xC] Remove CallImport bytecode.
      > [0xC] Function bodies have an implicit block.
      > [0xC] Remove the bottom label from loops.
      > [0xC] Add signatures to blocks.
      > [0xC] Remove arities from branches.
      > Add tests for init expression decoding.
      > Rework compilation of import wrappers and how they are patched.
      > Rework function indices in debugging.
      > Fix ASM->WASM builder for stack machine.
      > Reorganize asm.js foreign functions due to import indices change.
      >
      > R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
      > BUG=chromium:575167
      > LOG=Y
      >
      > Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9
      > Cr-Commit-Position: refs/heads/master@{#39678}
      
      TBR=ahaas@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org,rossberg@chromium.org,bradnelson@google.com,titzer@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=chromium:575167
      
      Review-Url: https://codereview.chromium.org/2361053004
      Cr-Commit-Position: refs/heads/master@{#39685}
      e1eee748
    • titzer's avatar
      [wasm] Master CL for Binary 0xC changes. · 76eb976a
      titzer authored
      [0xC] Convert to stack machine semantics.
      [0xC] Use section codes instead of names.
      [0xC] Add elements section decoding.
      [0xC] Decoding of globals section.
      [0xC] Decoding of memory section.
      [0xC] Decoding of imports section.
      [0xC] Decoding of exports section.
      [0xC] Decoding of data section.
      [0xC] Remove CallImport bytecode.
      [0xC] Function bodies have an implicit block.
      [0xC] Remove the bottom label from loops.
      [0xC] Add signatures to blocks.
      [0xC] Remove arities from branches.
      Add tests for init expression decoding.
      Rework compilation of import wrappers and how they are patched.
      Rework function indices in debugging.
      Fix ASM->WASM builder for stack machine.
      Reorganize asm.js foreign functions due to import indices change.
      
      R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Review-Url: https://codereview.chromium.org/2345593003
      Cr-Commit-Position: refs/heads/master@{#39678}
      76eb976a
  32. 13 Sep, 2016 1 commit
    • jpp's avatar
      [V8][Wasm] Removes references to finally in wasm. · ee8ae932
      jpp authored
      The initial support for low level exception handling in Wasm will not
      support finally blocks. This decision is taken for both simplicity (
      handling finallys is not straightforward if we want try blocks to yield
      values), and lack of good use case (clang++ does not need them.) They
      may be added in the future once we understand the implications of
      having them.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2336303002
      Cr-Commit-Position: refs/heads/master@{#39393}
      ee8ae932
  33. 12 Sep, 2016 1 commit