167 references to ReadUnaligned
GenerateDocumentationAndConfigFiles (4)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (4)
794Unsafe.ReadUnaligned<uint>(data) : 795BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 800Unsafe.ReadUnaligned<ulong>(data) : 801BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
ILCompiler.MetadataTransform (3)
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatReader.Primitives.cs (3)
27ushort result = Unsafe.ReadUnaligned<ushort>(stream); // Assumes little endian and unaligned access 34uint result = Unsafe.ReadUnaligned<uint>(stream); // Assumes little endian and unaligned access 41ulong result = Unsafe.ReadUnaligned<ulong>(stream); // Assumes little endian and unaligned access
Microsoft.AspNetCore.Razor.Utilities.Shared (4)
Utilities\Hashing\XxHashShared.cs (4)
793Unsafe.ReadUnaligned<uint>(data) : 794BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 799Unsafe.ReadUnaligned<ulong>(data) : 800BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
Microsoft.CodeAnalysis (4)
Hashing\XxHashShared.cs (4)
794Unsafe.ReadUnaligned<uint>(data) : 795BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 800Unsafe.ReadUnaligned<ulong>(data) : 801BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
Microsoft.CodeAnalysis.Analyzers (4)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (4)
794Unsafe.ReadUnaligned<uint>(data) : 795BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 800Unsafe.ReadUnaligned<ulong>(data) : 801BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (4)
794Unsafe.ReadUnaligned<uint>(data) : 795BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 800Unsafe.ReadUnaligned<ulong>(data) : 801BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
Microsoft.CodeAnalysis.CodeStyle (4)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (4)
794Unsafe.ReadUnaligned<uint>(data) : 795BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 800Unsafe.ReadUnaligned<ulong>(data) : 801BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (4)
794Unsafe.ReadUnaligned<uint>(data) : 795BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 800Unsafe.ReadUnaligned<ulong>(data) : 801BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
Microsoft.CodeAnalysis.Workspaces (4)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (4)
794Unsafe.ReadUnaligned<uint>(data) : 795BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 800Unsafe.ReadUnaligned<ulong>(data) : 801BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
Microsoft.Diagnostics.DataContractReader.Legacy (1)
StressTestApi\CdacStressApi.cs (1)
67DacStressArgGCRefMapRequest req = Unsafe.ReadUnaligned<DacStressArgGCRefMapRequest>(inBuffer);
Roslyn.Diagnostics.Analyzers (4)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (4)
794Unsafe.ReadUnaligned<uint>(data) : 795BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 800Unsafe.ReadUnaligned<ulong>(data) : 801BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
System.Collections.Immutable (8)
System\Collections\Frozen\String\Hashing.cs (8)
51hash1 = (BitOperations.RotateLeft(Hash1Start, 5) + Hash1Start) ^ Unsafe.ReadUnaligned<uint>(src); 52hash2 = (BitOperations.RotateLeft(Hash1Start, 5) + Hash1Start) ^ Unsafe.ReadUnaligned<uint>(src + 2); 62hash1 = (BitOperations.RotateLeft(hash1, 5) + hash1) ^ Unsafe.ReadUnaligned<uint>(ptr); 63hash2 = (BitOperations.RotateLeft(hash2, 5) + hash2) ^ Unsafe.ReadUnaligned<uint>(ptr + 2); 114hash1 = (BitOperations.RotateLeft(Hash1Start, 5) + Hash1Start) ^ (Unsafe.ReadUnaligned<uint>(src) | LowercaseUInt32); 115hash2 = (BitOperations.RotateLeft(Hash1Start, 5) + Hash1Start) ^ (Unsafe.ReadUnaligned<uint>(src + 2) | LowercaseUInt32); 125hash1 = (BitOperations.RotateLeft(hash1, 5) + hash1) ^ (Unsafe.ReadUnaligned<uint>(ptr) | LowercaseUInt32); 126hash2 = (BitOperations.RotateLeft(hash2, 5) + hash2) ^ (Unsafe.ReadUnaligned<uint>(ptr + 2) | LowercaseUInt32);
System.IO.Hashing (4)
System\IO\Hashing\XxHashShared.cs (4)
799Unsafe.ReadUnaligned<uint>(data) : 800BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<uint>(data)); 805Unsafe.ReadUnaligned<ulong>(data) : 806BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned<ulong>(data));
System.Private.CoreLib (102)
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatReader.Primitives.cs (3)
27ushort result = Unsafe.ReadUnaligned<ushort>(stream); // Assumes little endian and unaligned access 34uint result = Unsafe.ReadUnaligned<uint>(stream); // Assumes little endian and unaligned access 41ulong result = Unsafe.ReadUnaligned<ulong>(stream); // Assumes little endian and unaligned access
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (1)
332uint tempValue = Unsafe.ReadUnaligned<uint>(pSource + currIdx);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (7)
152result = Unsafe.ReadUnaligned<short>(pointer + _offset + position); 177result = Unsafe.ReadUnaligned<int>(pointer + _offset + position); 202result = Unsafe.ReadUnaligned<long>(pointer + _offset + position); 232lo = Unsafe.ReadUnaligned<int>(pointer); 233mid = Unsafe.ReadUnaligned<int>(pointer + 4); 234hi = Unsafe.ReadUnaligned<int>(pointer + 8); 235flags = Unsafe.ReadUnaligned<int>(pointer + 12);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.NumberToFloatingPointBits.cs (1)
936ulong val = Unsafe.ReadUnaligned<ulong>(chars);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (3)
315return Unsafe.ReadUnaligned<short>(addr); 339return Unsafe.ReadUnaligned<int>(addr); 386return Unsafe.ReadUnaligned<long>(addr);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (2)
195return Unsafe.ReadUnaligned<T>(ptr); 249Unsafe.Add(ref structure, (nint)(uint)i) = Unsafe.ReadUnaligned<T>(ptr + alignedSizeofT * (uint)i);
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (8)
815hash1 = BitOperations.RotateLeft(hash1, 5) + hash1 ^ Unsafe.ReadUnaligned<uint>(ptr); 816hash2 = BitOperations.RotateLeft(hash2, 5) + hash2 ^ Unsafe.ReadUnaligned<uint>(ptr + 1); 823hash1 = BitOperations.RotateLeft(hash1, 5) + hash1 ^ Unsafe.ReadUnaligned<uint>(ptr); 834hash2 = BitOperations.RotateLeft(hash2, 5) + hash2 ^ Unsafe.ReadUnaligned<uint>(ptr); 925p0 = Unsafe.ReadUnaligned<uint>(ptr); 926p1 = Unsafe.ReadUnaligned<uint>(ptr + 1); 941p0 = Unsafe.ReadUnaligned<uint>(ptr); 958p0 = Unsafe.ReadUnaligned<uint>(ptr);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (2)
319ulong nextBlockAsUInt64 = Unsafe.ReadUnaligned<ulong>(&pSrc[i]); 378uint nextBlockAsUInt32 = Unsafe.ReadUnaligned<uint>(&pSrc[i]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (25)
267currentUInt32 = Unsafe.ReadUnaligned<uint>(pBuffer); 268uint nextUInt32 = Unsafe.ReadUnaligned<uint>(pBuffer + 4); 292currentUInt32 = Unsafe.ReadUnaligned<uint>(pBuffer); 305currentUInt32 = Unsafe.ReadUnaligned<ushort>(pBuffer); 640ulong candidateUInt64 = Unsafe.ReadUnaligned<ulong>(pBuffer); 655currentDWord = Unsafe.ReadUnaligned<uint>(pBuffer); 656uint nextDWord = Unsafe.ReadUnaligned<uint>(pBuffer + 4); 680currentDWord = Unsafe.ReadUnaligned<uint>(pBuffer); 695currentDWord = Unsafe.ReadUnaligned<ushort>(pBuffer); 889currentUInt32 = Unsafe.ReadUnaligned<uint>(pBuffer); 890uint nextUInt32 = Unsafe.ReadUnaligned<uint>(pBuffer + 4 / sizeof(char)); 914currentUInt32 = Unsafe.ReadUnaligned<uint>(pBuffer); 1196ulong candidateUInt64 = Unsafe.ReadUnaligned<ulong>(pBuffer); 1213currentDWord = Unsafe.ReadUnaligned<uint>(pBuffer); 1214uint nextDWord = Unsafe.ReadUnaligned<uint>(pBuffer + 4 / sizeof(char)); 1238currentDWord = Unsafe.ReadUnaligned<uint>(pBuffer); 1362utf16Data64Bits = Unsafe.ReadUnaligned<ulong>(pUtf16Buffer); 1370utf16Data32BitsHigh = Unsafe.ReadUnaligned<uint>(pUtf16Buffer); 1371utf16Data32BitsLow = Unsafe.ReadUnaligned<uint>(pUtf16Buffer + 4 / sizeof(char)); 1406utf16Data64Bits = Unsafe.ReadUnaligned<ulong>(pUtf16Buffer + currentOffset); 1416utf16Data32BitsHigh = Unsafe.ReadUnaligned<uint>(pUtf16Buffer + currentOffset); 1417utf16Data32BitsLow = Unsafe.ReadUnaligned<uint>(pUtf16Buffer + currentOffset + 4 / sizeof(char)); 1435utf16Data32BitsHigh = Unsafe.ReadUnaligned<uint>(pUtf16Buffer + currentOffset); 2108asciiData = Unsafe.ReadUnaligned<uint>(pAsciiBuffer + currentOffset); 2123asciiData = Unsafe.ReadUnaligned<ushort>(pAsciiBuffer + currentOffset);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (21)
53if (Vector.LessThanOrEqualAll(Unsafe.ReadUnaligned<Vector<ushort>>(pBuffer), maxLatin1)) 99currentUInt32 = Unsafe.ReadUnaligned<uint>(pBuffer); 100uint nextUInt32 = Unsafe.ReadUnaligned<uint>(pBuffer + 4 / sizeof(char)); 124currentUInt32 = Unsafe.ReadUnaligned<uint>(pBuffer); 464ulong candidateUInt64 = Unsafe.ReadUnaligned<ulong>(pBuffer); 481currentDWord = Unsafe.ReadUnaligned<uint>(pBuffer); 482uint nextDWord = Unsafe.ReadUnaligned<uint>(pBuffer + 4 / sizeof(char)); 506currentDWord = Unsafe.ReadUnaligned<uint>(pBuffer); 561utf16Data64Bits = Unsafe.ReadUnaligned<ulong>(pUtf16Buffer); 569utf16Data32BitsHigh = Unsafe.ReadUnaligned<uint>(pUtf16Buffer); 570utf16Data32BitsLow = Unsafe.ReadUnaligned<uint>(pUtf16Buffer + 4 / sizeof(char)); 593utf16Data64Bits = Unsafe.ReadUnaligned<ulong>(pUtf16Buffer); 601utf16Data32BitsHigh = Unsafe.ReadUnaligned<uint>(pUtf16Buffer); 602utf16Data32BitsLow = Unsafe.ReadUnaligned<uint>(pUtf16Buffer + 4 / sizeof(char)); 614Vector<ushort> utf16VectorHigh = Unsafe.ReadUnaligned<Vector<ushort>>(pUtf16Buffer + currentOffset); 615Vector<ushort> utf16VectorLow = Unsafe.ReadUnaligned<Vector<ushort>>(pUtf16Buffer + currentOffset + Vector<ushort>.Count); 645utf16Data64Bits = Unsafe.ReadUnaligned<ulong>(pUtf16Buffer + currentOffset); 655utf16Data32BitsHigh = Unsafe.ReadUnaligned<uint>(pUtf16Buffer + currentOffset); 656utf16Data32BitsLow = Unsafe.ReadUnaligned<uint>(pUtf16Buffer + currentOffset + 4 / sizeof(char)); 674utf16Data32BitsHigh = Unsafe.ReadUnaligned<uint>(pUtf16Buffer + currentOffset); 1088Vector<byte> latin1Vector = Unsafe.ReadUnaligned<Vector<byte>>(pLatin1Buffer + currentOffset);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (1)
288thisChar = Unsafe.ReadUnaligned<uint>(pInputBuffer);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Transcoding.cs (20)
71uint thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 106thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 107secondDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer + sizeof(uint)); 247thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 302thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 391thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 414thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 498uint secondDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer + 3); 554thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 907thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 961utf16Data = Unsafe.ReadUnaligned<Vector128<short>>(pInputBuffer); 1013possibleNonAsciiQWord = Unsafe.ReadUnaligned<ulong>(pInputBuffer); 1120thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 1121secondDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer + 2); 1197thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 1234thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 1294thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 1333thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 1391thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 1411thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Validation.cs (8)
76uint thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 106thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 211thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); // no longer guaranteed to be aligned 257thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 312thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 366thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer); 477ulong thisQWord = Unsafe.ReadUnaligned<ulong>(pInputBuffer); 577thisDWord = Unsafe.ReadUnaligned<uint>(pInputBuffer);
System.Private.Reflection.Execution (3)
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatReader.Primitives.cs (3)
27ushort result = Unsafe.ReadUnaligned<ushort>(stream); // Assumes little endian and unaligned access 34uint result = Unsafe.ReadUnaligned<uint>(stream); // Assumes little endian and unaligned access 41ulong result = Unsafe.ReadUnaligned<ulong>(stream); // Assumes little endian and unaligned access
System.Private.StackTraceMetadata (3)
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatReader.Primitives.cs (3)
27ushort result = Unsafe.ReadUnaligned<ushort>(stream); // Assumes little endian and unaligned access 34uint result = Unsafe.ReadUnaligned<uint>(stream); // Assumes little endian and unaligned access 41ulong result = Unsafe.ReadUnaligned<ulong>(stream); // Assumes little endian and unaligned access
System.Private.TypeLoader (3)
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatReader.Primitives.cs (3)
27ushort result = Unsafe.ReadUnaligned<ushort>(stream); // Assumes little endian and unaligned access 34uint result = Unsafe.ReadUnaligned<uint>(stream); // Assumes little endian and unaligned access 41ulong result = Unsafe.ReadUnaligned<ulong>(stream); // Assumes little endian and unaligned access
System.Reflection.Metadata (3)
System\Reflection\Internal\Utilities\MemoryBlock.cs (3)
130uint result = Unsafe.ReadUnaligned<uint>(Pointer + offset); 188ushort result = Unsafe.ReadUnaligned<ushort>(Pointer + offset); 248return Unsafe.ReadUnaligned<Guid>(ptr);
System.Security.Cryptography (1)
System\Security\Cryptography\CngHelpers.cs (1)
251KeyBlobMagicNumber magic = (KeyBlobMagicNumber)Unsafe.ReadUnaligned<int>(pRsaBlob);