Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 3d09d01

Browse files
FeiPengInteljkotas
authored andcommitted
Fix SSE2 and SSE4.1 APIs (#15160)
1 parent d861307 commit 3d09d01

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

src/mscorlib/src/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ public static class Sse2
4242
/// <summary>
4343
/// __m128i _mm_add_epi64 (__m128i a, __m128i b)
4444
/// </summary>
45-
public static Vector128<long> Add(Vector128<byte> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
45+
public static Vector128<long> Add(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
4646
/// <summary>
4747
/// __m128i _mm_add_epi64 (__m128i a, __m128i b)
4848
/// </summary>
49-
public static Vector128<ulong> Add(Vector128<sbyte> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
49+
public static Vector128<ulong> Add(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
5050
/// <summary>
5151
/// __m128d _mm_add_pd (__m128d a, __m128d b)
5252
/// </summary>

src/mscorlib/src/System/Runtime/Intrinsics/X86/Sse2.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ public static class Sse2
4242
/// <summary>
4343
/// __m128i _mm_add_epi64 (__m128i a, __m128i b)
4444
/// </summary>
45-
public static Vector128<long> Add(Vector128<byte> left, Vector128<long> right) => Add(left, right);
45+
public static Vector128<long> Add(Vector128<long> left, Vector128<long> right) => Add(left, right);
4646
/// <summary>
4747
/// __m128i _mm_add_epi64 (__m128i a, __m128i b)
4848
/// </summary>
49-
public static Vector128<ulong> Add(Vector128<sbyte> left, Vector128<ulong> right) => Add(left, right);
49+
public static Vector128<ulong> Add(Vector128<ulong> left, Vector128<ulong> right) => Add(left, right);
5050
/// <summary>
5151
/// __m128d _mm_add_pd (__m128d a, __m128d b)
5252
/// </summary>

src/mscorlib/src/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ public static class Sse41
119119
/// </summary>
120120
public static Vector128<long> ConvertToLong(Vector128<uint> value) { throw new PlatformNotSupportedException(); }
121121

122+
/// <summary>
123+
/// __m128 _mm_dp_ps (__m128 a, __m128 b, const int imm8)
124+
/// </summary>
125+
public static Vector128<float> DotProduct(Vector128<float> left, Vector128<float> right, byte control) { throw new PlatformNotSupportedException(); }
126+
/// <summary>
127+
/// __m128d _mm_dp_pd (__m128d a, __m128d b, const int imm8)
128+
/// </summary>
129+
public static Vector128<double> DotProduct(Vector128<double> left, Vector128<double> right, byte control) { throw new PlatformNotSupportedException(); }
130+
122131
/// <summary>
123132
/// int _mm_extract_epi8 (__m128i a, const int imm8)
124133
/// </summary>

src/mscorlib/src/System/Runtime/Intrinsics/X86/Sse41.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ public static class Sse41
119119
/// </summary>
120120
public static Vector128<long> ConvertToLong(Vector128<uint> value) => ConvertToLong(value);
121121

122+
/// <summary>
123+
/// __m128 _mm_dp_ps (__m128 a, __m128 b, const int imm8)
124+
/// </summary>
125+
public static Vector128<float> DotProduct(Vector128<float> left, Vector128<float> right, byte control) => DotProduct(left, right, control);
126+
/// <summary>
127+
/// __m128d _mm_dp_pd (__m128d a, __m128d b, const int imm8)
128+
/// </summary>
129+
public static Vector128<double> DotProduct(Vector128<double> left, Vector128<double> right, byte control) => DotProduct(left, right, control);
130+
122131
/// <summary>
123132
/// int _mm_extract_epi8 (__m128i a, const int imm8)
124133
/// </summary>

0 commit comments

Comments
 (0)