File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/libraries/System.Private.CoreLib/src/System/Text Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -650,7 +650,10 @@ private static unsafe nuint GetIndexOfFirstNonAsciiChar_Intrinsified(char* pBuff
650650 Debug . Assert ( Sse2 . IsSupported || AdvSimd . Arm64 . IsSupported , "Sse2 or AdvSimd64 required." ) ;
651651 Debug . Assert ( BitConverter . IsLittleEndian , "This SSE2/Arm64 implementation assumes little-endian." ) ;
652652
653- Vector128 < byte > bitmask = Vector128 . Create ( ( ushort ) 0x1001 ) . AsByte ( ) ;
653+ Vector128 < byte > bitmask = BitConverter . IsLittleEndian ?
654+ Vector128 . Create ( 0x80402010_08040201 ) . AsByte ( ) :
655+ Vector128 . Create ( 0x01020408_10204080 ) . AsByte ( ) ;
656+
654657 Vector128 < ushort > firstVector , secondVector ;
655658 uint currentMask ;
656659 char * pOriginalBuffer = pBuffer ;
You can’t perform that action at this time.
0 commit comments