Skip to content

[API Proposal]: SVE 2.1: Correct multi register store methods #115338

Open

Description

@a74nh

#94011 approved the following:

namespace System.Runtime.Intrinsics.Arm

/// VectorT Summary
public abstract class Sve : AdvSimd /// Feature: FEAT_SVE  Category: loads
{
  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void Store(Vector<T> mask, T* address, Vector<T> data); // ST1W or ST1D or ST1B or ST1H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void Store(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2) data); // ST2W or ST2D or ST2B or ST2H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void Store(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3) data); // ST3W or ST3D or ST3B or ST3H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void Store(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3, Vector<T> Value4) data); // ST4W or ST4D or ST4B or ST4H

}

The following was implemented:

namespace System.Runtime.Intrinsics.Arm

/// VectorT Summary
public abstract class Sve : AdvSimd /// Feature: FEAT_SVE  Category: loads
{

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void StoreAndZip(Vector<T> mask, T* address, Vector<T> data); // ST1W or ST1D or ST1B or ST1H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void StoreAndZip(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2) data); // ST2W or ST2D or ST2B or ST2H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void StoreAndZip(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3) data); // ST3W or ST3D or ST3B or ST3H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void StoreAndZip(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3, Vector<T> Value4) data); // ST4W or ST4D or ST4B or ST4H

}

API Proposal

The following is proposed:

namespace System.Runtime.Intrinsics.Arm

/// VectorT Summary
public abstract class Sve : AdvSimd /// Feature: FEAT_SVE  Category: loads
{
  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void Store(Vector<T> mask, T* address, Vector<T> data); // ST1W or ST1D or ST1B or ST1H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
 public static unsafe void Store(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2) data); // ST1W or ST1D or ST1B or ST1H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void Store(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3) data); // ST1W or ST1D or ST1B or ST1H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void Store(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3, Vector<T> Value4) data); // ST1W or ST1D or ST1B or ST1H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void StoreAndZip(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2) data); // ST2W or ST2D or ST1B or ST2H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void StoreAndZip(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3) data); // ST3W or ST3D or ST3B or ST3H

  /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe void StoreAndZip(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3, Vector<T> Value4) data); // ST4W or ST4D or ST4B or ST4H
}

Activity

  1. added
    untriaged
    on May 6, 2025
  2. added
    arm-sve
    and removed
    untriaged
    on May 6, 2025
  3. dotnet-policy-service commented on May 6, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics
    See info in area-owners.md if you want to be subscribed.

  4. tannergooding commented on May 8, 2025

    @tannergooding
    Member

    Similar to the load API, I believe we want both Store and StoreAndZip variants, much as we have for AdvSimd.

  5. added this to the Future milestone on May 30, 2025
  6. added
    api-ready-for-review
    on Jun 12, 2025
  7. modified the milestones: Future, 10.0.0 on Jun 12, 2025
  8. changed the title [-][API Proposal]: SVE: Rename Store() to StoreAndZip()[/-] [+][API Proposal]: SVE: SVE: Correct multi register Store() methods[/+] on Jun 12, 2025
  9. changed the title [-][API Proposal]: SVE: SVE: Correct multi register Store() methods[/-] [+][API Proposal]: SVE: SVE: Correct multi register store methods[/+] on Jun 12, 2025
  10. changed the title [-][API Proposal]: SVE: SVE: Correct multi register store methods[/-] [+][API Proposal]: SVE: Correct multi register store methods[/+] on Jun 12, 2025
  11. bartonjs commented on Jun 17, 2025

    @bartonjs
    Member

    Video

    Updating to 4 Store methods and 3 StoreAndZip methods looks good as proposed

    namespace System.Runtime.Intrinsics.Arm
    
    /// VectorT Summary
    public abstract class Sve : AdvSimd /// Feature: FEAT_SVE  Category: loads
    {
      /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
      public static unsafe void Store(Vector<T> mask, T* address, Vector<T> data); // ST1W or ST1D or ST1B or ST1H
    
      /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
     public static unsafe void Store(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2) data); // ST1W or ST1D or ST1B or ST1H
    
      /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
      public static unsafe void Store(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3) data); // ST1W or ST1D or ST1B or ST1H
    
      /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
      public static unsafe void Store(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3, Vector<T> Value4) data); // ST1W or ST1D or ST1B or ST1H
    
      /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
      public static unsafe void StoreAndZip(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2) data); // ST2W or ST2D or ST1B or ST2H
    
      /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
      public static unsafe void StoreAndZip(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3) data); // ST3W or ST3D or ST3B or ST3H
    
      /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
      public static unsafe void StoreAndZip(Vector<T> mask, T* address, (Vector<T> Value1, Vector<T> Value2, Vector<T> Value3, Vector<T> Value4) data); // ST4W or ST4D or ST4B or ST4H
    }
  12. added
    api-approved
    and removed
    api-ready-for-review
    on Jun 17, 2025
  13. a74nh commented on Jul 4, 2025

    @a74nh
    ContributorAuthor

    The reason why we missed Store is that they are SVE2.1. Will leave those until we do SVE2.1

  14. modified the milestones: 10.0.0, Future on Jul 7, 2025
  15. a74nh commented on Jul 7, 2025

    @a74nh
    ContributorAuthor

    Moving to future. SVE1 APIs are correct. SVE2.1 APIs are for the future.

  16. changed the title [-][API Proposal]: SVE: Correct multi register store methods[/-] [+][API Proposal]: SVE 2.1: Correct multi register store methods[/+] on Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api-approvedarea-System.Runtime.Intrinsicsarm-sve

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions