File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,16 @@ UnsafeRawPointerTestSuite.test("load.unaligned.largeAlignment")
1717 var offset = 3
1818 let int128 = withUnsafeTemporaryAllocation ( of: UInt8 . self, capacity: 64 ) {
1919 temporary -> Builtin . Int128 in
20- _ = temporary. initialize ( from: 0 ..< 64 )
2120 let buffer = UnsafeRawBufferPointer ( temporary)
21+ _ = temporary. initialize ( from: repeatElement ( 0 , count: 64 ) )
22+ // Load a 128-bit floating point value
23+ let fp = buffer. loadUnaligned ( fromByteOffset: offset, as: Builtin . FPIEEE128. self)
24+ noop ( fp)
25+ temporary. baseAddress!. deinitialize ( count: 64 )
26+ _ = temporary. initialize ( from: 0 ..< 64 )
2227 let aligned = buffer. baseAddress!. alignedUp ( for: Builtin . Int128. self)
2328 offset += buffer. baseAddress!. distance ( to: aligned)
29+ // Load and return a 128-bit integer value
2430 return buffer. loadUnaligned ( fromByteOffset: offset, as: Builtin . Int128. self)
2531 }
2632 withUnsafeBytes ( of: int128) {
You can’t perform that action at this time.
0 commit comments