Skip to content

[API Proposal]: SVE: Correct multi register load methods #114910

Open
@a74nh

Description

@a74nh

#97831 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 (Vector<T>, Vector<T>) LoadVectorx2(Vector<T> mask, T* address); // LD2W or LD2D or LD2B or LD2H

    /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
    public static unsafe (Vector<T>, Vector<T>, Vector<T>) LoadVectorx3(Vector<T> mask, T* address); // LD3W or LD3D or LD3B or LD3H

    /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
    public static unsafe (Vector<T>, Vector<T>, Vector<T>, Vector<T>) LoadVectorx4(Vector<T> mask, T* address); // LD4W or LD4D or LD4B or LD4H
}

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 (Vector<T>, Vector<T>) LoadVector2xAndUnzip(Vector<T> mask, T* address); // LD2W or LD2D or LD2B or LD2H

    /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
    public static unsafe (Vector<T>, Vector<T>, Vector<T>) LoadVector3xAndUnzip(Vector<T> mask, T* address); // LD3W or LD3D or LD3B or LD3H

    /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
    public static unsafe (Vector<T>, Vector<T>, Vector<T>, Vector<T>) LoadVector4xAndUnzip(Vector<T> mask, T* address); // LD4W or LD4D or LD4B or LD4H
}

In additional there was no approval or implementation for the multiple structure LD1 instructions.

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 (Vector<T>, Vector<T>) LoadVector2x(Vector<T> mask, T* address); // LD1W or LD1D or LD1B or LD1H

    /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
    public static unsafe (Vector<T>, Vector<T>, Vector<T>) LoadVector3x(Vector<T> mask, T* address); // LD1W or LD1D or LD1B or LD1H

    /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
    public static unsafe (Vector<T>, Vector<T>, Vector<T>, Vector<T>) LoadVector4x(Vector<T> mask, T* address); // LD1W or LD1D or LD1B or LD1H

    /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
    public static unsafe (Vector<T>, Vector<T>) LoadVector2xAndUnzip(Vector<T> mask, T* address); // LD2W or LD2D or LD2B or LD2H

    /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
    public static unsafe (Vector<T>, Vector<T>, Vector<T>) LoadVector3xAndUnzip(Vector<T> mask, T* address); // LD3W or LD3D or LD3B or LD3H

    /// T: float, double, sbyte, short, int, long, byte, ushort, uint, ulong
    public static unsafe (Vector<T>, Vector<T>, Vector<T>, Vector<T>) LoadVector4xAndUnzip(Vector<T> mask, T* address); // LD4W or LD4D or LD4B or LD4H
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions