File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/libraries/System.Private.CoreLib/src/System/Text Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 7
7
using System . Runtime . InteropServices ;
8
8
using System . Runtime . Intrinsics ;
9
9
using System . Runtime . Intrinsics . Arm ;
10
+ using System . Runtime . Intrinsics . Wasm ;
10
11
using System . Runtime . Intrinsics . X86 ;
11
12
12
13
namespace System . Text
@@ -522,6 +523,11 @@ public static Vector128<ushort> Load128(ref byte ptr)
522
523
Vector128 < byte > vec = Vector128 . CreateScalarUnsafe ( Unsafe . ReadUnaligned < long > ( ref ptr ) ) . AsByte ( ) ;
523
524
return Sse2 . UnpackLow ( vec , Vector128 < byte > . Zero ) . AsUInt16 ( ) ;
524
525
}
526
+ else if ( PackedSimd . IsSupported )
527
+ {
528
+ Vector128 < byte > vec = Vector128 . CreateScalarUnsafe ( Unsafe . ReadUnaligned < long > ( ref ptr ) ) . AsByte ( ) ;
529
+ return PackedSimd . ZeroExtendWideningLower ( vec ) ;
530
+ }
525
531
else
526
532
{
527
533
( Vector64 < ushort > lower , Vector64 < ushort > upper ) = Vector64 . Widen ( Vector64 . LoadUnsafe ( ref ptr ) ) ;
You can’t perform that action at this time.
0 commit comments