1. 13 Jun, 2018 3 commits
  2. 29 May, 2018 1 commit
  3. 28 May, 2018 1 commit
    • Ben L. Titzer's avatar
      [wasm] Improve fastpath for getting simple opcode signature · 2b5f7205
      Ben L. Titzer authored
      This CL improves the parsing and validation speed of WASM bytecode by
      eliminating a call to get the "simple opcode signature" on the fast
      path. It introduces a byte-indexed array that points directly to a
      FunctionSig*. By declaring the array in the  wasm-opcodes.h header file
      and initializing (constexpr) in the wasm-opcodes.cc file, the decoder
      can use this array directly in its first test. (Note that constexpr
      obviates the need for LazyInitialize in previous iterations of this
      mechanism).
      
      There are two more calls on this fast path that can be simplified,
      WasmOpcodes::IsSignExtensionOpcode() and WasmOpcodes::IsAnyRefOpcode().
      These calls are needed to check for a feature flag and can be
      implemented differently in a followup CL.
      
      R=mstarzinger@chromium.org
      
      Change-Id: Ibb4adb1134932c7e0b6a35facec4d8dd8c998c56
      Reviewed-on: https://chromium-review.googlesource.com/1075276Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53391}
      2b5f7205
  4. 24 Apr, 2018 1 commit
  5. 23 Mar, 2018 1 commit
  6. 07 Mar, 2018 1 commit
  7. 02 Mar, 2018 1 commit
  8. 07 Feb, 2018 1 commit
  9. 31 Jan, 2018 1 commit
    • Karl Schimpf's avatar
      [wasm] Implement i64.trunc_s:sat/f32 · ef98172d
      Karl Schimpf authored
      Implements the saturating opcode i64.trunc_s:sat/f32.
      
      Also does some refactoring of the i32 saturating opcodes use a simplier
      solution (calling a single method to handle all i32 values).
      
      Also refactors code so that the remaining i64 saturating conversions
      should be easy to add to the wasm compiler.
      
      Bug: v8:7226
      Change-Id: I031aca1e059b4baa989a56ecbc16941f591ff9b3
      Reviewed-on: https://chromium-review.googlesource.com/887333
      Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#51001}
      ef98172d
  10. 25 Jan, 2018 1 commit
  11. 16 Jan, 2018 1 commit
  12. 27 Dec, 2017 1 commit
  13. 12 Dec, 2017 1 commit
  14. 04 Dec, 2017 1 commit
  15. 02 Dec, 2017 1 commit
    • Mathias Bynens's avatar
      Normalize casing of hexadecimal digits · 822be9b2
      Mathias Bynens authored
      This patch normalizes the casing of hexadecimal digits in escape
      sequences of the form `\xNN` and integer literals of the form
      `0xNNNN`.
      
      Previously, the V8 code base used an inconsistent mixture of uppercase
      and lowercase.
      
      Google’s C++ style guide uses uppercase in its examples:
      https://google.github.io/styleguide/cppguide.html#Non-ASCII_Characters
      
      Moreover, uppercase letters more clearly stand out from the lowercase
      `x` (or `u`) characters at the start, as well as lowercase letters
      elsewhere in strings.
      
      BUG=v8:7109
      TBR=marja@chromium.org,titzer@chromium.org,mtrofin@chromium.org,mstarzinger@chromium.org,rossberg@chromium.org,yangguo@chromium.org,mlippautz@chromium.org
      NOPRESUBMIT=true
      
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I790e21c25d96ad5d95c8229724eb45d2aa9e22d6
      Reviewed-on: https://chromium-review.googlesource.com/804294
      Commit-Queue: Mathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49810}
      822be9b2
  16. 06 Nov, 2017 1 commit
  17. 27 Oct, 2017 1 commit
  18. 20 Oct, 2017 1 commit
  19. 02 Oct, 2017 1 commit
  20. 08 Sep, 2017 1 commit
  21. 10 Jul, 2017 2 commits
  22. 28 Jun, 2017 1 commit
  23. 19 Jun, 2017 1 commit
  24. 13 Jun, 2017 1 commit
  25. 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
  26. 30 May, 2017 2 commits
    • Clemens Hammacher's avatar
      [base] Fix CHECK/DCHECK macros for enum types · 38b586c6
      Clemens Hammacher authored
      The problem with enums is that neither is_integral, nor is_signed or
      is_unsigned is true for them. Thus, comparison with our CHECK/DCHECK
      macros always just uses the default comparison, which fails if the
      signedness of the underlying integer types does not match.
      This CL fixes this by considering the underlying integer type of an
      enum to choose the right comparison operator.
      
      R=ishell@chromium.org
      CC=ahaas@chromium.org
      
      Change-Id: I5ef56d1b86228e879f5866967ab7e709f1e97f0b
      Reviewed-on: https://chromium-review.googlesource.com/518123
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45593}
      38b586c6
    • Clemens Hammacher's avatar
      [wasm] [cleanup] Avoid lazy initialization of arrays · 737962f8
      Clemens Hammacher authored
      Both lazy initialization and static initialization (via static
      initializer) are bad. Fortunately, the arrays we are constructing are
      constant anyway, so we can just compute them at compile time. This is
      enforced by making them constexpr.
      This also saves all code needed for the initialization, and makes
      accesses to the tables faster, as they don't need any atomic operations
      (via LazyInstance).
      
      R=ahaas@chromium.org
      
      Change-Id: I7d3ba9b0f2602f596a6c71c8c567e0d1bc306268
      Reviewed-on: https://chromium-review.googlesource.com/517083
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45589}
      737962f8
  27. 04 May, 2017 1 commit
  28. 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
  29. 25 Apr, 2017 1 commit
    • 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
  30. 24 Apr, 2017 1 commit
  31. 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
  32. 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
  33. 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
  34. 16 Mar, 2017 1 commit
  35. 15 Mar, 2017 1 commit
  36. 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