Skip to content

Commit

Permalink
Update generator
Browse files Browse the repository at this point in the history
  • Loading branch information
martinothamar committed Jul 9, 2023
1 parent 57449a3 commit 14482c7
Show file tree
Hide file tree
Showing 11 changed files with 171,055 additions and 161 deletions.
6 changes: 4 additions & 2 deletions src/External/RawIntrinsics/AVX.ManuallyAdded.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics;

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1857:A constant is expected for the parameter", Justification = "TBD")]

namespace RawIntrinsics
{
Expand All @@ -22,4 +24,4 @@ public static partial class AVX
/// <returns><c>__m256i dst {M256}</c></returns>
public static __m256i _mm256_setzero_si256() => System.Runtime.Intrinsics.Vector256<byte>.Zero;
}
}
}
76 changes: 30 additions & 46 deletions src/External/RawIntrinsics/AVX.cs

Large diffs are not rendered by default.

110 changes: 55 additions & 55 deletions src/External/RawIntrinsics/AVX2.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/External/RawIntrinsics/Other.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static unsafe partial class Other
/// <param name="a"><c>__m128i {M128}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {M128}</c></returns>
public static __m128i _mm_aeskeygenassist_si128(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Aes.KeygenAssist(a.UI8, (byte)imm8);
public static __m128i _mm_aeskeygenassist_si128(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Aes.KeygenAssist(a.UI8, (byte)imm8);

/// <summary>
/// Perform a carry-less multiplication of two 64-bit integers, selected from "a" and "b" according to "imm8", and store the results in "dst".
Expand All @@ -63,7 +63,7 @@ public static unsafe partial class Other
/// <param name="b"><c>__m128i {M128}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {M128}</c></returns>
public static __m128i _mm_clmulepi64_si128(__m128i a, __m128i b, int imm8) => System.Runtime.Intrinsics.X86.Pclmulqdq.CarrylessMultiply(a.SI64, b.SI64, (byte)imm8);
public static __m128i _mm_clmulepi64_si128(__m128i a, __m128i b, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Pclmulqdq.CarrylessMultiply(a.SI64, b.SI64, (byte)imm8);

/// <summary>
/// Count the number of bits set to 1 in unsigned 32-bit integer "a", and return that count in "dst".
Expand Down
10 changes: 5 additions & 5 deletions src/External/RawIntrinsics/SSE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ public static unsafe partial class SSE
public static __m128 _mm_loadu_ps(float* mem_addr) => System.Runtime.Intrinsics.X86.Sse.LoadVector128(mem_addr);

/// <summary>
/// Compare packed single-precision (32-bit) floating-point elements in "a" and "b", and store packed maximum values in "dst".
/// Compare packed single-precision (32-bit) floating-point elements in "a" and "b", and store packed maximum values in "dst". [max_float_note]
/// </summary>
/// <remarks><c>MAXPS xmm, xmm</c></remarks>
/// <param name="a"><c>__m128 {FP32}</c></param>
Expand All @@ -428,7 +428,7 @@ public static unsafe partial class SSE
public static __m128 _mm_max_ps(__m128 a, __m128 b) => System.Runtime.Intrinsics.X86.Sse.Max(a.FP32, b.FP32);

/// <summary>
/// Compare the lower single-precision (32-bit) floating-point elements in "a" and "b", store the maximum value in the lower element of "dst", and copy the upper 3 packed elements from "a" to the upper element of "dst".
/// Compare the lower single-precision (32-bit) floating-point elements in "a" and "b", store the maximum value in the lower element of "dst", and copy the upper 3 packed elements from "a" to the upper element of "dst". [max_float_note]
/// </summary>
/// <remarks><c>MAXSS xmm, xmm</c></remarks>
/// <param name="a"><c>__m128 {FP32}</c></param>
Expand All @@ -437,7 +437,7 @@ public static unsafe partial class SSE
public static __m128 _mm_max_ss(__m128 a, __m128 b) => System.Runtime.Intrinsics.X86.Sse.MaxScalar(a.FP32, b.FP32);

/// <summary>
/// Compare packed single-precision (32-bit) floating-point elements in "a" and "b", and store packed minimum values in "dst".
/// Compare packed single-precision (32-bit) floating-point elements in "a" and "b", and store packed minimum values in "dst". [min_float_note]
/// </summary>
/// <remarks><c>MINPS xmm, xmm</c></remarks>
/// <param name="a"><c>__m128 {FP32}</c></param>
Expand All @@ -446,7 +446,7 @@ public static unsafe partial class SSE
public static __m128 _mm_min_ps(__m128 a, __m128 b) => System.Runtime.Intrinsics.X86.Sse.Min(a.FP32, b.FP32);

/// <summary>
/// Compare the lower single-precision (32-bit) floating-point elements in "a" and "b", store the minimum value in the lower element of "dst", and copy the upper 3 packed elements from "a" to the upper element of "dst".
/// Compare the lower single-precision (32-bit) floating-point elements in "a" and "b", store the minimum value in the lower element of "dst", and copy the upper 3 packed elements from "a" to the upper element of "dst". [min_float_note]
/// </summary>
/// <remarks><c>MINSS xmm, xmm</c></remarks>
/// <param name="a"><c>__m128 {FP32}</c></param>
Expand Down Expand Up @@ -591,7 +591,7 @@ public static unsafe partial class SSE
/// <param name="b"><c>__m128 {FP32}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128 dst {FP32}</c></returns>
public static __m128 _mm_shuffle_ps(__m128 a, __m128 b, int imm8) => System.Runtime.Intrinsics.X86.Sse.Shuffle(a.FP32, b.FP32, (byte)imm8);
public static __m128 _mm_shuffle_ps(__m128 a, __m128 b, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse.Shuffle(a.FP32, b.FP32, (byte)imm8);

/// <summary>
/// Compute the square root of packed single-precision (32-bit) floating-point elements in "a", and store the results in "dst".
Expand Down
40 changes: 20 additions & 20 deletions src/External/RawIntrinsics/SSE2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {M128}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {M128}</c></returns>
public static __m128i _mm_bslli_si128(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftLeftLogical128BitLane(a.SI8, (byte)imm8);
public static __m128i _mm_bslli_si128(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftLeftLogical128BitLane(a.SI8, (byte)imm8);

/// <summary>
/// Shift "a" right by "imm8" bytes while shifting in zeros, and store the results in "dst".
Expand All @@ -162,7 +162,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {M128}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {M128}</c></returns>
public static __m128i _mm_bsrli_si128(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightLogical128BitLane(a.SI8, (byte)imm8);
public static __m128i _mm_bsrli_si128(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightLogical128BitLane(a.SI8, (byte)imm8);

/// <summary>
/// Compare packed 16-bit integers in "a" and "b" for equality, and store the results in "dst".
Expand Down Expand Up @@ -704,7 +704,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI16}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>int dst {UI16}</c></returns>
public static int _mm_extract_epi16(__m128i a, int imm8) => (int)System.Runtime.Intrinsics.X86.Sse2.Extract(a.UI16, (byte)imm8);
public static int _mm_extract_epi16(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => (int)System.Runtime.Intrinsics.X86.Sse2.Extract(a.UI16, (byte)imm8);

/// <summary>
/// Copy "a" to "dst", and insert the 16-bit integer "i" into "dst" at the location specified by "imm8".
Expand All @@ -714,7 +714,7 @@ public static unsafe partial class SSE2
/// <param name="i"><c>int {UI16}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI16}</c></returns>
public static __m128i _mm_insert_epi16(__m128i a, int i, int imm8) => System.Runtime.Intrinsics.X86.Sse2.Insert(a.UI16, (ushort)i, (byte)imm8);
public static __m128i _mm_insert_epi16(__m128i a, int i, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.Insert(a.UI16, (ushort)i, (byte)imm8);

/// <summary>
/// Perform a serializing operation on all load-from-memory instructions that were issued prior to this instruction. Guarantees that every load instruction that precedes, in program order, is globally visible before any load instruction which follows the fence in program order.
Expand Down Expand Up @@ -835,7 +835,7 @@ public static unsafe partial class SSE2
public static __m128i _mm_max_epu8(__m128i a, __m128i b) => System.Runtime.Intrinsics.X86.Sse2.Max(a.UI8, b.UI8);

/// <summary>
/// Compare packed double-precision (64-bit) floating-point elements in "a" and "b", and store packed maximum values in "dst".
/// Compare packed double-precision (64-bit) floating-point elements in "a" and "b", and store packed maximum values in "dst". [max_float_note]
/// </summary>
/// <remarks><c>MAXPD xmm, xmm</c></remarks>
/// <param name="a"><c>__m128d {FP64}</c></param>
Expand All @@ -844,7 +844,7 @@ public static unsafe partial class SSE2
public static __m128d _mm_max_pd(__m128d a, __m128d b) => System.Runtime.Intrinsics.X86.Sse2.Max(a.FP64, b.FP64);

/// <summary>
/// Compare the lower double-precision (64-bit) floating-point elements in "a" and "b", store the maximum value in the lower element of "dst", and copy the upper element from "a" to the upper element of "dst".
/// Compare the lower double-precision (64-bit) floating-point elements in "a" and "b", store the maximum value in the lower element of "dst", and copy the upper element from "a" to the upper element of "dst". [max_float_note]
/// </summary>
/// <remarks><c>MAXSD xmm, xmm</c></remarks>
/// <param name="a"><c>__m128d {FP64}</c></param>
Expand Down Expand Up @@ -878,7 +878,7 @@ public static unsafe partial class SSE2
public static __m128i _mm_min_epu8(__m128i a, __m128i b) => System.Runtime.Intrinsics.X86.Sse2.Min(a.UI8, b.UI8);

/// <summary>
/// Compare packed double-precision (64-bit) floating-point elements in "a" and "b", and store packed minimum values in "dst".
/// Compare packed double-precision (64-bit) floating-point elements in "a" and "b", and store packed minimum values in "dst". [min_float_note]
/// </summary>
/// <remarks><c>MINPD xmm, xmm</c></remarks>
/// <param name="a"><c>__m128d {FP64}</c></param>
Expand All @@ -887,7 +887,7 @@ public static unsafe partial class SSE2
public static __m128d _mm_min_pd(__m128d a, __m128d b) => System.Runtime.Intrinsics.X86.Sse2.Min(a.FP64, b.FP64);

/// <summary>
/// Compare the lower double-precision (64-bit) floating-point elements in "a" and "b", store the minimum value in the lower element of "dst", and copy the upper element from "a" to the upper element of "dst".
/// Compare the lower double-precision (64-bit) floating-point elements in "a" and "b", store the minimum value in the lower element of "dst", and copy the upper element from "a" to the upper element of "dst". [min_float_note]
/// </summary>
/// <remarks><c>MINSD xmm, xmm</c></remarks>
/// <param name="a"><c>__m128d {FP64}</c></param>
Expand Down Expand Up @@ -1150,7 +1150,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI32}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI32}</c></returns>
public static __m128i _mm_shuffle_epi32(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.Shuffle(a.UI32, (byte)imm8);
public static __m128i _mm_shuffle_epi32(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.Shuffle(a.UI32, (byte)imm8);

/// <summary>
/// Shuffle double-precision (64-bit) floating-point elements using the control in "imm8", and store the results in "dst".
Expand All @@ -1160,7 +1160,7 @@ public static unsafe partial class SSE2
/// <param name="b"><c>__m128d {FP64}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128d dst {FP64}</c></returns>
public static __m128d _mm_shuffle_pd(__m128d a, __m128d b, int imm8) => System.Runtime.Intrinsics.X86.Sse2.Shuffle(a.FP64, b.FP64, (byte)imm8);
public static __m128d _mm_shuffle_pd(__m128d a, __m128d b, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.Shuffle(a.FP64, b.FP64, (byte)imm8);

/// <summary>
/// Shuffle 16-bit integers in the high 64 bits of "a" using the control in "imm8". Store the results in the high 64 bits of "dst", with the low 64 bits being copied from from "a" to "dst".
Expand All @@ -1169,7 +1169,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI16}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI16}</c></returns>
public static __m128i _mm_shufflehi_epi16(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShuffleHigh(a.UI16, (byte)imm8);
public static __m128i _mm_shufflehi_epi16(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShuffleHigh(a.UI16, (byte)imm8);

/// <summary>
/// Shuffle 16-bit integers in the low 64 bits of "a" using the control in "imm8". Store the results in the low 64 bits of "dst", with the high 64 bits being copied from from "a" to "dst".
Expand All @@ -1178,7 +1178,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI16}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI16}</c></returns>
public static __m128i _mm_shufflelo_epi16(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShuffleLow(a.UI16, (byte)imm8);
public static __m128i _mm_shufflelo_epi16(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShuffleLow(a.UI16, (byte)imm8);

/// <summary>
/// Shift packed 16-bit integers in "a" left by "count" while shifting in zeros, and store the results in "dst".
Expand Down Expand Up @@ -1214,7 +1214,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI16}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI16}</c></returns>
public static __m128i _mm_slli_epi16(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftLeftLogical(a.UI16, (byte)imm8);
public static __m128i _mm_slli_epi16(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftLeftLogical(a.UI16, (byte)imm8);

/// <summary>
/// Shift packed 32-bit integers in "a" left by "imm8" while shifting in zeros, and store the results in "dst".
Expand All @@ -1223,7 +1223,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI32}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI32}</c></returns>
public static __m128i _mm_slli_epi32(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftLeftLogical(a.UI32, (byte)imm8);
public static __m128i _mm_slli_epi32(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftLeftLogical(a.UI32, (byte)imm8);

/// <summary>
/// Shift packed 64-bit integers in "a" left by "imm8" while shifting in zeros, and store the results in "dst".
Expand All @@ -1232,7 +1232,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI64}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI64}</c></returns>
public static __m128i _mm_slli_epi64(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftLeftLogical(a.UI64, (byte)imm8);
public static __m128i _mm_slli_epi64(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftLeftLogical(a.UI64, (byte)imm8);

/// <summary>
/// Compute the square root of packed double-precision (64-bit) floating-point elements in "a", and store the results in "dst".
Expand Down Expand Up @@ -1276,7 +1276,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {SI16}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI16}</c></returns>
public static __m128i _mm_srai_epi16(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightArithmetic(a.SI16, (byte)imm8);
public static __m128i _mm_srai_epi16(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightArithmetic(a.SI16, (byte)imm8);

/// <summary>
/// Shift packed 32-bit integers in "a" right by "imm8" while shifting in sign bits, and store the results in "dst".
Expand All @@ -1285,7 +1285,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {SI32}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI32}</c></returns>
public static __m128i _mm_srai_epi32(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightArithmetic(a.SI32, (byte)imm8);
public static __m128i _mm_srai_epi32(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightArithmetic(a.SI32, (byte)imm8);

/// <summary>
/// Shift packed 16-bit integers in "a" right by "count" while shifting in zeros, and store the results in "dst".
Expand Down Expand Up @@ -1321,7 +1321,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI16}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI16}</c></returns>
public static __m128i _mm_srli_epi16(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightLogical(a.UI16, (byte)imm8);
public static __m128i _mm_srli_epi16(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightLogical(a.UI16, (byte)imm8);

/// <summary>
/// Shift packed 32-bit integers in "a" right by "imm8" while shifting in zeros, and store the results in "dst".
Expand All @@ -1330,7 +1330,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI32}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI32}</c></returns>
public static __m128i _mm_srli_epi32(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightLogical(a.UI32, (byte)imm8);
public static __m128i _mm_srli_epi32(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightLogical(a.UI32, (byte)imm8);

/// <summary>
/// Shift packed 64-bit integers in "a" right by "imm8" while shifting in zeros, and store the results in "dst".
Expand All @@ -1339,7 +1339,7 @@ public static unsafe partial class SSE2
/// <param name="a"><c>__m128i {UI64}</c></param>
/// <param name="imm8"><c>int {IMM}</c></param>
/// <returns><c>__m128i dst {UI64}</c></returns>
public static __m128i _mm_srli_epi64(__m128i a, int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightLogical(a.UI64, (byte)imm8);
public static __m128i _mm_srli_epi64(__m128i a, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] int imm8) => System.Runtime.Intrinsics.X86.Sse2.ShiftRightLogical(a.UI64, (byte)imm8);

/// <summary>
/// Store 128-bits (composed of 2 packed double-precision (64-bit) floating-point elements) from "a" into memory. "mem_addr" must be aligned on a 16-byte boundary or a general-protection exception may be generated.
Expand Down
Loading

0 comments on commit 14482c7

Please sign in to comment.