1. 01 Nov, 2021 1 commit
  2. 26 Oct, 2021 1 commit
  3. 25 Oct, 2021 1 commit
  4. 20 Oct, 2021 1 commit
    • Milad Fa's avatar
      PPC/s390: [turbofan] Handle class constructor · d219d39a
      Milad Fa authored
      Port e127f584
      
      Original Commit Message:
      
          Handling of class constructors was moved from CallFunction to Call
          in [1].
          When reducing calls with spread we forward varargs directly to
          CallFunction, if we are spreading to inlined arguments or arguments of
          the outermost function.
          In that case we didn't check for class constructors and therefore didn't
          raise an exception.
          This CL adds checks for class constructors to all JSCall* nodes in
          JSCallReducer that missed them before.
      
          [1] https://crrev.com/c/3186434
      
      R=pthier@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
      BUG=
      LOG=N
      
      Change-Id: I02cba90369354f064201daa1bf8812e17cb2dc21
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3234040Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/main@{#77480}
      d219d39a
  5. 30 Sep, 2021 1 commit
  6. 29 Sep, 2021 1 commit
    • Milad Fa's avatar
      PPC/s390: Create Instance Type for Class Constructors · 7245d2c1
      Milad Fa authored
      Port: 1cd7a582
      
      Original Commit Message:
      
      Class Constructors are special, because they are callable but [[Call]]
      raises an exception. Instead of checking if a JS function is a class
      constructor for every JS function call, this CL adds a new instance
      type for class constructors.
      This way we can use a fast instance type range check for the common
      case, and only check for class constructors in the uncommon case were
      a class constructor is called and when we need to raise an exception.
      
      Change-Id: I578fde90d00d1e80cf36ba28205ce9bfe6830afb
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3192422Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/main@{#77147}
      7245d2c1
  7. 07 Sep, 2021 1 commit
    • Milad Fa's avatar
      PPC/s390: [sparkplug] Remove BaselineData, use Code directly · 0100a8e8
      Milad Fa authored
      Port 787bec09
      
      Original Commit Message:
      
          Remove the BaselineData intermediate structure for baseline code, and
          write the baseline Code object into the SharedFunctionInfo directly. We
          still need a pointer to the BytecodeArray/InterpreterData, so re-use the
          Code object's deoptimization data slot for this (baseline code doesn't
          have deoptimization data).
      
          A consequence of this is that the BytecodeArray pointer becomes
          immutable when there is baseline code. This means that we cannot install
          a debug BytecodeArray while baseline code is active (we have to flush it
          first), and we can't tier-up code with debug BytecodeArray to baseline.
      
      R=leszeks@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
      BUG=
      LOG=N
      
      Change-Id: I7e0f7d964341774340d27f1890cef4c7d9ee9dda
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3145171Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/main@{#76694}
      0100a8e8
  8. 12 Aug, 2021 1 commit
  9. 04 Aug, 2021 1 commit
  10. 19 Jul, 2021 2 commits
  11. 30 Jun, 2021 1 commit
  12. 28 Jun, 2021 1 commit
  13. 24 Jun, 2021 1 commit
  14. 21 Jun, 2021 2 commits
  15. 18 Jun, 2021 1 commit
  16. 16 Jun, 2021 1 commit
    • Milad Fa's avatar
      PPC/S390: Introduce MultiPush/Pop of doubles and/or Simd registers · df912633
      Milad Fa authored
      When pushing/popping registers, we need a way in PPC and S390
      to detect if Simd registers need to be pushed or not.
      
      On PPC Simd registers are separate from FP registers, hence we
      need to push them both. If Simd is not available then we push
      an empty space in place of Simd registers.
      
      On S390 the Simd and FP registers are shared. If Simd is available
      then we only push them and not the FPs, else we push FP registers
      as well as an empty space the size of FPs as the stack needs to look
      like as if Simds were saved too.
      
      We also need to check if we are generating builtins or
      call is being made at runtime. We cannot use `SupportsWasmSimd128`
      when generating builtin as `CpuFeatures` are turned off, so we need
      to emit the `if/else` manually for checking the value of
      `SupportsWasmSimd128`.
      
      
      Change-Id: Id149c6578db9c2f92d903fd871d85c648d43ce70
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2958963Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#75188}
      df912633
  17. 14 Jun, 2021 1 commit
  18. 11 Jun, 2021 1 commit
  19. 07 Jun, 2021 1 commit
  20. 01 Jun, 2021 1 commit
  21. 12 May, 2021 1 commit
  22. 11 May, 2021 2 commits
  23. 10 May, 2021 1 commit
  24. 06 May, 2021 1 commit
  25. 21 Apr, 2021 1 commit
  26. 19 Apr, 2021 2 commits
    • Milad Fa's avatar
      PPC/s390: Reland "[codegen] Add static interface descriptors" · ea177a6b
      Milad Fa authored
      Port 2871e05c
      
      Original Commit Message:
      
          This is a reland of ae0752df
      
          Reland fixes:
      
            * Remove UNREACHABLE() from constexpr switch, since we don't have a
              CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
              enum anyway).
            * Fix IsRegisterArray trait to use public inheritance and size_t for
              std::array size.
      
          Original change's description:
          > [codegen] Add static interface descriptors
          >
          > Add a new CRTP StaticCallInterfaceDescriptor class, which provides
          > static constexpr getters for a descriptor's registers, parameter counts,
          > and so on. Each CallInterfaceDescriptor subclass is changed to extend
          > StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
          > extending CallInterfaceDescriptor to still provide a dynamic lookup
          > where needed.
          >
          > StaticCallInterfaceDescriptor provides a couple of customisation points,
          > where it reads its CRTP derived descriptor's static fields and
          > functions, with default fallbacks where appropriate. With these
          > customisation points, the definition of CallInterfaceDescriptor
          > subclasses is simplified to:
          >
          >     a) Providing parameter names (as before)
          >     b) Providing parameter types (as before)
          >     c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
          >        static booleans on the class.
          >     d) Optionally providing a `registers()` method that returns a
          >        std::array<Register, N> of registers that may be used for
          >        parameters (if not provided, this defaults to the implementation
          >        specific default register set).
          >
          > Parameter registers (and register count) are automagically set based on
          > the number of parameters and number of given registers, with extra magic
          > to ignore no_reg registers (to reduce ia32 special casing). The
          > CallInterfaceDescriptorData is initialized based on these static
          > functions, rather than manual per-descriptor initializers.
          >
          > This allows us to skip loading descriptors dynamically for CallBuiltin
          > in Sparkplug, and instead lets us use a bit of template magic to
          > statically set up arguments for the calls. Any other users of statically
          > known descriptors will also benefit, thanks to C++ picking the static
          > methods over the dynamic methods on the base class when available.
          >
          > Because we can remove various virtual functions and trigger heavier
          > inlining of constantly known values, binary size slightly decreases with
          > this change.
          >
          > Note that torque-generated descriptors are changed to use the same magic,
          > rather than having Torque-specific magic, for consistency.
          >
          > Bug: v8:11420
          > Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
          > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
          > Auto-Submit: Leszek Swirski <leszeks@chromium.org>
          > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
          > Reviewed-by: Clemens Backes <clemensb@chromium.org>
          > Reviewed-by: Igor Sheludko <ishell@chromium.org>
          > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
          > Commit-Queue: Clemens Backes <clemensb@chromium.org>
          > Cr-Commit-Position: refs/heads/master@{#73996}
      
      R=leszeks@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
      BUG=
      LOG=N
      
      Change-Id: Id854bb901df72787ed225fc8790c3f626121ab3a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2830897Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#74034}
      ea177a6b
    • Patrick Thier's avatar
      [interpreter][cleanup] Rename interpreter entry trampolines · d90be52e
      Patrick Thier authored
      Rename
       - InterpreterEnterBytecodeDispatch to InterpreterEnterAtBytecode
       - InterpreterEnterBytecodeAdvance to InterpreterEnterAtNextBytecode.
      
      The reason for renaming is consistency with baseline trampolines that
      have similar functionality, but the old names didn't fit for baseline
      very well.
      
      Change-Id: I35897972fdd71f3bb0db74820db2b9034144a3c8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2830794Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Auto-Submit: Patrick Thier <pthier@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74027}
      d90be52e
  27. 15 Apr, 2021 1 commit
    • Milad Fa's avatar
      PPC/s390: [wasm][x64] Fix OSR shadow stack violation · 80aaae9e
      Milad Fa authored
      Port 06a2c2e0
      
      Original Commit Message:
      
          We currently allow OSR (On-Stack Replacement) of arbitrarily deep return
          addresses. This is in direct violation of Intel CET's shadow stack,
          which we plan to enable eventually.
      
          This change works around this by postponing OSR until after we return to
          the old code. The main changes are:
          - Reserve a slot in Liftoff frames to store the OSR target,
          - Skip the return address modification, and instead store the new code
          pointer in the dedicated slot,
          - Upon returning to the old code, check the slot and do an indirect jump
          to the new code if needed.
      
          CET also prevents indirect jumps to arbitrary locations, so the last
          point is also a CET violation. Valid indirect jump targets must be
          marked with the ENDBRANCH instruction, which I will do in a follow-up
          CL.
      
      R=thibaudm@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
      BUG=
      LOG=N
      
      Change-Id: Id972de1ba7556474cb00b377ea3a38eb4332eae3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2828870Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#73984}
      80aaae9e
  28. 14 Apr, 2021 1 commit
  29. 06 Apr, 2021 1 commit
    • Milad Fa's avatar
      PPC/s390: Reland "[sparkplug] OSR Ignition -> Sparkplug" · 1b9d14a8
      Milad Fa authored
      Port 064ca18c
      
      Original Commit Message:
      
          This is a reland of b9c521d0.
      
          Fixes crashes by calling kInstallBaselineCode from BaselineEntry if
          needed, i.e. when there is no feedback vector (required a bit of
          register rejiggling).
          This can happen with cross-realm calls. The OSR arming is stored as
          part of the BytecodeArray and therefore shared across realms.
      
          Original change's description:
          > [sparkplug] OSR Ignition -> Sparkplug
          >
          > Add support for OSR to baseline code.
          > We compile baseline and perform OSR immediately when the bytecode budget
          > interrupt hits.
          >
          > Drive-by: Clean-up deoptimizer special handling of JumpLoop by using
          > the newly introduced GetBaselinePCForNextExecutedBytecode instead of
          > GetBaselineEndPCForBytecodeOffset.
          >
          > Bug: v8:11420
          > Change-Id: Ifbea264d4a83a127dd2a11e28626bf2a5e8aca59
          > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2784687
          > Commit-Queue: Patrick Thier <pthier@chromium.org>
          > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
          > Cr-Commit-Position: refs/heads/master@{#73677}
      
      R=pthier@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
      BUG=
      LOG=N
      
      Change-Id: I724e8f7a3a2064daae282d892c0e0d6dbd8b691a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2807854Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#73807}
      1b9d14a8
  30. 25 Mar, 2021 1 commit
    • Milad Fa's avatar
      Reland "PPC/s390: [sparkplug][deoptimizer] Deoptimize to baseline." · 20a44ed4
      Milad Fa authored
      This reverts commit d8c6b2ec.
      
      Reason for revert: original cl has relanded
      
      Original change's description:
      > Revert "PPC/s390: [sparkplug][deoptimizer] Deoptimize to baseline."
      >
      > This reverts commit 94272ea5.
      >
      > Reason for revert: original port was reverted
      >
      > Original change's description:
      > > PPC/s390: [sparkplug][deoptimizer] Deoptimize to baseline.
      > >
      > > Port bdcd7d79
      > >
      > > Original Commit Message:
      > >
      > >     If we have baseline code, deoptimize to baseline instead of the
      > >     interpreter. The process is similar to deopting to the interpreter.
      > >     We just use different builtins
      > >     (BaselineEnterAtBytecode/BaselineEnterAtNextBytecode) instead of
      > >     InterpreterEnterBytecodeDispatch/InterpreterEnterBytecodeAdvance, that
      > >     patch an interpreter frame to a baseline frame and continue execution in
      > >     baseline code (based on the deopt type, at the current or next
      > >     bytecode).
      > >
      > > R=​pthier@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
      > > BUG=
      > > LOG=N
      > >
      > > Change-Id: I3230f3f3c6506230b2751a3389f10b022dec61a3
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2783022
      > > Reviewed-by: Junliang Yan <junyan@redhat.com>
      > > Commit-Queue: Milad Fa <mfarazma@redhat.com>
      > > Cr-Commit-Position: refs/heads/master@{#73618}
      >
      > Change-Id: I903ad90099c4dc5f153d28aea9246933ac69972b
      > No-Presubmit: true
      > No-Tree-Checks: true
      > No-Try: true
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2784002
      > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      > Commit-Queue: Milad Fa <mfarazma@redhat.com>
      > Cr-Commit-Position: refs/heads/master@{#73630}
      
      Change-Id: I7746f42472ae63e49770f491ae6b8ef7b596cfce
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2785380
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#73661}
      20a44ed4
  31. 24 Mar, 2021 1 commit
    • Milad Fa's avatar
      Revert "PPC/s390: [sparkplug][deoptimizer] Deoptimize to baseline." · d8c6b2ec
      Milad Fa authored
      This reverts commit 94272ea5.
      
      Reason for revert: original port was reverted
      
      Original change's description:
      > PPC/s390: [sparkplug][deoptimizer] Deoptimize to baseline.
      >
      > Port bdcd7d79
      >
      > Original Commit Message:
      >
      >     If we have baseline code, deoptimize to baseline instead of the
      >     interpreter. The process is similar to deopting to the interpreter.
      >     We just use different builtins
      >     (BaselineEnterAtBytecode/BaselineEnterAtNextBytecode) instead of
      >     InterpreterEnterBytecodeDispatch/InterpreterEnterBytecodeAdvance, that
      >     patch an interpreter frame to a baseline frame and continue execution in
      >     baseline code (based on the deopt type, at the current or next
      >     bytecode).
      >
      > R=​pthier@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
      > BUG=
      > LOG=N
      >
      > Change-Id: I3230f3f3c6506230b2751a3389f10b022dec61a3
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2783022
      > Reviewed-by: Junliang Yan <junyan@redhat.com>
      > Commit-Queue: Milad Fa <mfarazma@redhat.com>
      > Cr-Commit-Position: refs/heads/master@{#73618}
      
      Change-Id: I903ad90099c4dc5f153d28aea9246933ac69972b
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2784002
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#73630}
      d8c6b2ec
  32. 23 Mar, 2021 1 commit
    • Milad Fa's avatar
      PPC/s390: [sparkplug][deoptimizer] Deoptimize to baseline. · 94272ea5
      Milad Fa authored
      Port bdcd7d79
      
      Original Commit Message:
      
          If we have baseline code, deoptimize to baseline instead of the
          interpreter. The process is similar to deopting to the interpreter.
          We just use different builtins
          (BaselineEnterAtBytecode/BaselineEnterAtNextBytecode) instead of
          InterpreterEnterBytecodeDispatch/InterpreterEnterBytecodeAdvance, that
          patch an interpreter frame to a baseline frame and continue execution in
          baseline code (based on the deopt type, at the current or next
          bytecode).
      
      R=pthier@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
      BUG=
      LOG=N
      
      Change-Id: I3230f3f3c6506230b2751a3389f10b022dec61a3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2783022Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#73618}
      94272ea5
  33. 11 Mar, 2021 1 commit
    • Milad Fa's avatar
      PPC/s390: Reland "[no-wasm] Exclude src/wasm from compilation" · 8224bdf4
      Milad Fa authored
      Port 3f9ff062
      
      Original Commit Message:
      
          This is a reland of 80f5dfda. A condition
          in pipeline.cc was inverted, which lead to a CSA verifier error.
      
          Original change's description:
          > [no-wasm] Exclude src/wasm from compilation
          >
          > This is the biggest chunk, including
          > - all of src/wasm,
          > - torque file for wasm objects,
          > - torque file for wasm builtins,
          > - wasm builtins,
          > - wasm runtime functions,
          > - int64 lowering,
          > - simd scala lowering,
          > - WasmGraphBuilder (TF graph construction for wasm),
          > - wasm frame types,
          > - wasm interrupts,
          > - the JSWasmCall opcode,
          > - wasm backing store allocation.
          >
          > Those components are all recursively entangled, so I found no way to
          > split this change up further.
          >
          > Some includes that were recursively included by wasm headers needed to
          > be added explicitly now.
          >
          > backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
          > because it only tests wasm backing stores. This file is excluded from
          > no-wasm builds then.
          >
          > R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
          >
          > Bug: v8:11238
          > Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
          > Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
          > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
          > Commit-Queue: Clemens Backes <clemensb@chromium.org>
          > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
          > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
          > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
          > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
          > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
          > Cr-Commit-Position: refs/heads/master@{#73344}
      
      R=clemensb@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
      BUG=
      LOG=N
      
      Change-Id: I006f32407aea051c960f32942f9353f415547116
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2753143Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
      Commit-Queue: Milad Fa <mfarazma@redhat.com>
      Cr-Commit-Position: refs/heads/master@{#73357}
      8224bdf4
  34. 25 Feb, 2021 1 commit
  35. 23 Feb, 2021 1 commit
  36. 16 Feb, 2021 1 commit