1. 17 Apr, 2019 1 commit
  2. 11 Apr, 2019 1 commit
    • Clemens Hammacher's avatar
      [wasm][x64] Use near jump in jump table · 3cd6705f
      Clemens Hammacher authored
      On x64, we allocate one big code region such that we can use near jumps
      and near calls. The jump table did not make use of that design yet.
      This CL changes that by emitting jump table slots as near jumps. This
      also speeds up patching jump table slots significantly, since far jumps
      populate the inline constant pool, which is unneeded overhead in this
      case.
      As a drive-by, this CL cleans up the API of near_call and near_jmp. The
      current semantics is broken, and only works because this is only used
      for WebAssembly calls which are patched anyway after code generation.
      Also, x64 now uses the same path in test-jump-table-assembler.cc as
      arm64 to ensure that all targets are within near-call-distance.
      
      R=mstarzinger@chromium.org
      
      Bug: v8:8916
      Change-Id: Iffc34e248b72167307ffdab62dd2212c4ae86a32
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1561313Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60777}
      3cd6705f
  3. 01 Mar, 2019 1 commit
  4. 18 Feb, 2019 1 commit
  5. 15 Feb, 2019 1 commit
  6. 13 Feb, 2019 1 commit
  7. 10 Oct, 2018 3 commits
  8. 09 Aug, 2018 1 commit
  9. 08 Aug, 2018 2 commits
  10. 07 Aug, 2018 1 commit
  11. 09 Jul, 2018 1 commit
    • Sigurd Schneider's avatar
      [turbofan] Use relative calls/jumps on arm for builtins · 23dbb81d
      Sigurd Schneider authored
      This CL uses pc-relative jumps and calls (B/BL) for calls from embedded
      builtins to embedded builtins. To make this work, the code range size is
      limited to 32MB on arm during mksnapshot, which ensures that all builtin
      to builtin offsets for jumps/calls fit into the B/BL immediate. At code
      generation time, we put a placeholder into the instruction offset which
      we resolve to the right code object when the code is copied to the heap.
      We use a new relocation mode RELATIVE_CODE_TARGET for these relative jumps.
      The relocation mode RELATIVE_CODE_TARGET should never appear after
      generating the snapshot.
      
      We modify the target_address/set_target_address methods of RelocInfo
      such that they return the absolute target addresses for pc-relative B/BL
      instructions. This ensures that the GC can treat RELATIVE_CODE_TARGET in
      the same way as code targets. This, however, only matters during
      snapshot creation time, and production code never contains
      RELATIVE_CODE_TARGET relocations.
      
      Bug: v8:6666
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: If7eab83ad588859ca87c654a5ddc3e37caea884c
      Reviewed-on: https://chromium-review.googlesource.com/1117181Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54320}
      23dbb81d
  12. 21 Jun, 2018 1 commit
  13. 20 Jun, 2018 1 commit
    • Predrag Rudic's avatar
      MIPS[64] Port "[wasm] Introduce jump table" · e0ddc6d2
      Predrag Rudic authored
      Port of 733b7c82
      
      Original description:
      > [wasm] Introduce jump table
      >
      > This introduces the concept of a jump table for WebAssembly, which is
      > used for every direct and indirect call to any WebAssembly function.
      > For lazy compilation, it will initially contain code to call the
      > WasmCompileLazy builtin, where it passes the function index to be
      > called.
      > For non-lazy-compilation, it will contain a jump to the actual code.
      > The jump table allows to easily redirect functions for lazy
      > compilation, tier-up, debugging and (in the future) code aging. After
      > this CL, we will not need to patch existing code any more for any of
      > these operations.
      >
      > R=mstarzinger@chromium.org, titzer@chromium.org
      >
      > Bug: v8:7758
      > Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
      > Reviewed-on: https://chromium-review.googlesource.com/1097075
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#53805}
      
      Change-Id: Ifa7c2abe89a6dc5dbb03a547db2fab68e292f344
      Reviewed-on: https://chromium-review.googlesource.com/1107630
      Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
      Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@mips.com>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53893}
      e0ddc6d2
  14. 19 Jun, 2018 3 commits
    • Junliang Yan's avatar
      PPC/s390: [wasm] Introduce jump table · eafcdc96
      Junliang Yan authored
      Port 733b7c82
      
      Original Commit Message:
      
          This introduces the concept of a jump table for WebAssembly, which is
          used for every direct and indirect call to any WebAssembly function.
          For lazy compilation, it will initially contain code to call the
          WasmCompileLazy builtin, where it passes the function index to be
          called.
          For non-lazy-compilation, it will contain a jump to the actual code.
          The jump table allows to easily redirect functions for lazy
          compilation, tier-up, debugging and (in the future) code aging. After
          this CL, we will not need to patch existing code any more for any of
          these operations.
      
      R=clemensh@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
      BUG= v8:7758
      
      Change-Id: I1a370910ffa56dbdd609be6922067842a6adf1df
      Reviewed-on: https://chromium-review.googlesource.com/1105060
      Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53852}
      eafcdc96
    • Clemens Hammacher's avatar
      [wasm] Fix jump table for long jumps on arm · d5177a02
      Clemens Hammacher authored
      Direct jumps only work for offset up to 64 MB on arm. For longer jumps,
      use indirect branches (load target from constant pool into the pc
      register).
      
      R=mstarzinger@chromium.org
      CC=pierre.langlois@arm.com
      
      Bug: v8:7758
      Change-Id: I1cf66b7d1bfb62cfcd6b1619c02816909a1f651e
      Reviewed-on: https://chromium-review.googlesource.com/1105996
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53847}
      d5177a02
    • Clemens Hammacher's avatar
      Reland "[wasm] Introduce jump table" · 5f56641b
      Clemens Hammacher authored
      This is a reland of 733b7c82.
      The arm64 bug was fixed in https://crrev.com/c/1105051.
      
      Original change's description:
      > [wasm] Introduce jump table
      >
      > This introduces the concept of a jump table for WebAssembly, which is
      > used for every direct and indirect call to any WebAssembly function.
      > For lazy compilation, it will initially contain code to call the
      > WasmCompileLazy builtin, where it passes the function index to be
      > called.
      > For non-lazy-compilation, it will contain a jump to the actual code.
      > The jump table allows to easily redirect functions for lazy
      > compilation, tier-up, debugging and (in the future) code aging. After
      > this CL, we will not need to patch existing code any more for any of
      > these operations.
      >
      > R=mstarzinger@chromium.org, titzer@chromium.org
      >
      > Bug: v8:7758
      > Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
      > Reviewed-on: https://chromium-review.googlesource.com/1097075
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#53805}
      
      TBR=titzer@chromium.org,mstarzinger@chromium.org
      
      Bug: v8:7758
      Change-Id: I68555230c6db97e70f0b8fef784188f55ee04794
      Reviewed-on: https://chromium-review.googlesource.com/1105158
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53829}
      5f56641b
  15. 18 Jun, 2018 2 commits
    • Clemens Hammacher's avatar
      Revert "[wasm] Introduce jump table" · 33f6c3e1
      Clemens Hammacher authored
      This reverts commit 733b7c82.
      
      Reason for revert: breaks arm64 gc-stress: https://ci.chromium.org/buildbot/client.v8.ports/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress/11659
      
      Original change's description:
      > [wasm] Introduce jump table
      > 
      > This introduces the concept of a jump table for WebAssembly, which is
      > used for every direct and indirect call to any WebAssembly function.
      > For lazy compilation, it will initially contain code to call the
      > WasmCompileLazy builtin, where it passes the function index to be
      > called.
      > For non-lazy-compilation, it will contain a jump to the actual code.
      > The jump table allows to easily redirect functions for lazy
      > compilation, tier-up, debugging and (in the future) code aging. After
      > this CL, we will not need to patch existing code any more for any of
      > these operations.
      > 
      > R=​mstarzinger@chromium.org, titzer@chromium.org
      > 
      > Bug: v8:7758
      > Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
      > Reviewed-on: https://chromium-review.googlesource.com/1097075
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#53805}
      
      TBR=mstarzinger@chromium.org,titzer@chromium.org,clemensh@chromium.org,sreten.kovacevic@mips.com
      
      Change-Id: Iea358db2cf13656a65cf69a6d82cbbc10d3e7e1c
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:7758
      Reviewed-on: https://chromium-review.googlesource.com/1105157Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53807}
      33f6c3e1
    • Clemens Hammacher's avatar
      [wasm] Introduce jump table · 733b7c82
      Clemens Hammacher authored
      This introduces the concept of a jump table for WebAssembly, which is
      used for every direct and indirect call to any WebAssembly function.
      For lazy compilation, it will initially contain code to call the
      WasmCompileLazy builtin, where it passes the function index to be
      called.
      For non-lazy-compilation, it will contain a jump to the actual code.
      The jump table allows to easily redirect functions for lazy
      compilation, tier-up, debugging and (in the future) code aging. After
      this CL, we will not need to patch existing code any more for any of
      these operations.
      
      R=mstarzinger@chromium.org, titzer@chromium.org
      
      Bug: v8:7758
      Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
      Reviewed-on: https://chromium-review.googlesource.com/1097075
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53805}
      733b7c82
  16. 14 Jun, 2018 1 commit