4 types derived from Sse2
System.Private.CoreLib (4)
283 references to Sse2
GenerateDocumentationAndConfigFiles (2)
http2cat (5)
IIS.FunctionalTests (5)
IIS.LongTests (5)
IIS.NewHandler.FunctionalTests (5)
IIS.NewShim.FunctionalTests (5)
IIS.ShadowCopy.Tests (5)
IISExpress.FunctionalTests (5)
Microsoft.AspNetCore.Server.HttpSys (5)
Microsoft.AspNetCore.Server.IIS (5)
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (5)
Microsoft.AspNetCore.Shared.Tests (5)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.ML.CpuMath (1)
System.IO.Hashing (6)
System.Numerics.Tensors (7)
System.Private.CoreLib (200)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (25)
380if (Sse2.IsSupported)
394lowerBits = Sse2.And(vector, Create(0x00000000_FFFFFFFFL)).AsInt32();
395lowerBits = Sse2.Or(lowerBits, Create(0x43300000_00000000).AsInt32());
398Vector128<long> upperBits = Sse2.ShiftRightLogical(vector, 32); // Extract the 32 most significant bits of vector
399upperBits = Sse2.Xor(upperBits, Create(0x45300000_80000000)); // Flip the msb of upperBits and blend with the bit representation of double(2^84 + 2^63)
401Vector128<double> result = Sse2.Subtract(upperBits.AsDouble(), Create(0x45300000_80100000).AsDouble()); // Compute in double precision: (upper - (2^84 + 2^63 + 2^52)) + lower
402return Sse2.Add(result, lowerBits.AsDouble());
421if (Sse2.IsSupported)
435lowerBits = Sse2.And(vector, Create(0x00000000_FFFFFFFFUL)).AsUInt32();
436lowerBits = Sse2.Or(lowerBits, Create(0x43300000_00000000UL).AsUInt32());
439Vector128<ulong> upperBits = Sse2.ShiftRightLogical(vector, 32); // Extract the 32 most significant bits of vector
440upperBits = Sse2.Xor(upperBits, Create(0x45300000_00000000UL)); // Blend upperBits with the bit representation of double(2^84)
442Vector128<double> result = Sse2.Subtract(upperBits.AsDouble(), Create(0x45300000_00100000UL).AsDouble()); // Compute in double precision: (upper - (2^84 + 2^52)) + lower
443return Sse2.Add(result, lowerBits.AsDouble());
527if (Sse2.IsSupported)
534Vector128<int> lowerBits = Sse2.And(vector, Create(0x0000FFFFU)).AsInt32();
535Vector128<int> upperBits = Sse2.ShiftRightLogical(vector, 16).AsInt32();
537Vector128<float> lower = Sse2.ConvertToVector128Single(lowerBits);
538Vector128<float> upper = Sse2.ConvertToVector128Single(upperBits);
4391[CompExactlyDependsOn(typeof(Sse2))]
4394if (Sse2.IsSupported)
4396return Sse2.UnpackLow(left, right);
4407[CompExactlyDependsOn(typeof(Sse2))]
4410if (Sse2.IsSupported)
4412return Sse2.UnpackHigh(left, right);
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (63)
27return (Sse2.IsSupported)
166[CompExactlyDependsOn(typeof(Sse2))]
184Debug.Assert(Sse2.IsSupported, "Should've been checked by caller.");
208firstVector = Sse2.LoadVector128((ushort*)pBuffer); // unaligned load
214currentMask = (uint)Sse2.MoveMask(Sse2.AddSaturate(firstVector, latin1MaskForAddSaturate).AsByte());
260firstVector = Sse2.LoadAlignedVector128((ushort*)pBuffer);
261secondVector = Sse2.LoadAlignedVector128((ushort*)pBuffer + SizeOfVector128InChars);
262Vector128<ushort> combinedVector = Sse2.Or(firstVector, secondVector);
278currentMask = (uint)Sse2.MoveMask(Sse2.AddSaturate(combinedVector, latin1MaskForAddSaturate).AsByte());
307firstVector = Sse2.LoadAlignedVector128((ushort*)pBuffer);
323currentMask = (uint)Sse2.MoveMask(Sse2.AddSaturate(firstVector, latin1MaskForAddSaturate).AsByte());
342firstVector = Sse2.LoadVector128((ushort*)pBuffer); // unaligned load
358currentMask = (uint)Sse2.MoveMask(Sse2.AddSaturate(firstVector, latin1MaskForAddSaturate).AsByte());
391currentMask = (uint)Sse2.MoveMask(Sse2.AddSaturate(firstVector, latin1MaskForAddSaturate).AsByte());
406currentMask = (uint)Sse2.MoveMask(Sse2.AddSaturate(firstVector, latin1MaskForAddSaturate).AsByte());
548if (Sse2.IsSupported)
764[CompExactlyDependsOn(typeof(Sse2))]
779Debug.Assert(Sse2.IsSupported);
789Vector128<short> utf16VectorFirst = Sse2.LoadVector128((short*)pUtf16Buffer); // unaligned load
805if ((Sse2.MoveMask(Sse2.AddSaturate(utf16VectorFirst.AsUInt16(), latin1MaskForAddSaturate).AsByte()) & NonLatin1DataSeenMask) != 0)
813Vector128<byte> latin1Vector = Sse2.PackUnsignedSaturate(utf16VectorFirst, utf16VectorFirst);
814Sse2.StoreScalar((ulong*)pLatin1Buffer, latin1Vector.AsUInt64()); // ulong* calculated here is UNALIGNED
833utf16VectorFirst = Sse2.LoadVector128((short*)pUtf16Buffer + currentOffsetInElements); // unaligned load
847if ((Sse2.MoveMask(Sse2.AddSaturate(utf16VectorFirst.AsUInt16(), latin1MaskForAddSaturate).AsByte()) & NonLatin1DataSeenMask) != 0)
854latin1Vector = Sse2.PackUnsignedSaturate(utf16VectorFirst, utf16VectorFirst);
855Sse2.StoreScalar((ulong*)(pLatin1Buffer + currentOffsetInElements), latin1Vector.AsUInt64()); // ulong* calculated here is UNALIGNED
872utf16VectorFirst = Sse2.LoadVector128((short*)pUtf16Buffer + currentOffsetInElements); // unaligned load
873Vector128<short> utf16VectorSecond = Sse2.LoadVector128((short*)pUtf16Buffer + currentOffsetInElements + SizeOfVector128 / sizeof(short)); // unaligned load
874Vector128<short> combinedVector = Sse2.Or(utf16VectorFirst, utf16VectorSecond);
888if ((Sse2.MoveMask(Sse2.AddSaturate(combinedVector.AsUInt16(), latin1MaskForAddSaturate).AsByte()) & NonLatin1DataSeenMask) != 0)
896latin1Vector = Sse2.PackUnsignedSaturate(utf16VectorFirst, utf16VectorSecond);
899Sse2.StoreAligned(pLatin1Buffer + currentOffsetInElements, latin1Vector); // aligned
924if ((Sse2.MoveMask(Sse2.AddSaturate(utf16VectorFirst.AsUInt16(), latin1MaskForAddSaturate).AsByte()) & NonLatin1DataSeenMask) != 0)
931latin1Vector = Sse2.PackUnsignedSaturate(utf16VectorFirst, utf16VectorFirst);
935Sse2.StoreScalar((ulong*)(pLatin1Buffer + currentOffsetInElements), latin1Vector.AsUInt64()); // ulong* calculated here is aligned
953if (Sse2.IsSupported)
963[CompExactlyDependsOn(typeof(Sse2))]
971Debug.Assert(Sse2.IsSupported);
988latin1Vector = Sse2.LoadScalarVector128((ulong*)pLatin1Buffer).AsByte(); // unaligned load
989Sse2.Store((byte*)pUtf16Buffer, Sse2.UnpackLow(latin1Vector, zeroVector)); // unaligned write
1010latin1Vector = Sse2.LoadVector128(pLatin1Buffer + currentOffset); // unaligned load
1016Vector128<byte> low = Sse2.UnpackLow(latin1Vector, zeroVector);
1017Sse2.StoreAligned((byte*)pCurrentWriteAddress, low);
1019Vector128<byte> high = Sse2.UnpackHigh(latin1Vector, zeroVector);
1020Sse2.StoreAligned((byte*)pCurrentWriteAddress + SizeOfVector128, high);
1036latin1Vector = Sse2.LoadScalarVector128((ulong*)(pLatin1Buffer + currentOffset)).AsByte(); // unaligned load
1037Sse2.Store((byte*)(pUtf16Buffer + currentOffset), Sse2.UnpackLow(latin1Vector, zeroVector)); // unaligned write
1045latin1Vector = Sse2.LoadScalarVector128((uint*)(pLatin1Buffer + currentOffset)).AsByte(); // unaligned load
1046Sse2.StoreScalar((ulong*)(pUtf16Buffer + currentOffset), Sse2.UnpackLow(latin1Vector, zeroVector).AsUInt64()); // unaligned write
1071Debug.Assert(!Sse2.IsSupported);
System.Runtime.Intrinsics (1)
Test.Utilities (2)