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")
17
17
var offset = 3
18
18
let int128 = withUnsafeTemporaryAllocation ( of: UInt8 . self, capacity: 64 ) {
19
19
temporary -> Builtin . Int128 in
20
- _ = temporary. initialize ( from: 0 ..< 64 )
21
20
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 )
22
27
let aligned = buffer. baseAddress!. alignedUp ( for: Builtin . Int128. self)
23
28
offset += buffer. baseAddress!. distance ( to: aligned)
29
+ // Load and return a 128-bit integer value
24
30
return buffer. loadUnaligned ( fromByteOffset: offset, as: Builtin . Int128. self)
25
31
}
26
32
withUnsafeBytes ( of: int128) {
You can’t perform that action at this time.
0 commit comments