[swift-dev] Builtin.loadRaw
Sam Ding
samding at ca.ibm.com
Thu Sep 28 16:16:00 CDT 2017
I am testing a test case "KeyPath.swift" on s390x for v4.0 . It is found
that " Builtin.loadRaw" as the below of
"stdlib/public/core/UnsafeRawPointer.swift.gyb" returns a different value
than that on x86-64.
@_inlineable
public func load<T>(fromByteOffset offset: Int = 0, as type: T.Type)
-> T {
_debugPrecondition(0 == (UInt(bitPattern: self + offset)
& (UInt(MemoryLayout<T>.alignment) - 1)),
"load from misaligned raw pointer")
return Builtin.loadRaw((self + offset)._rawValue) // return a
different value on s390x vs x86-64
}
My debugger (lldb) does not guide me to the detailed of " Builtin.loadRaw".
Searching "loadRaw" and finding
swift/include/swift/AST/Builtins.def:BUILTIN_SIL_OPERATION(LoadRaw,
"loadRaw", Special)
But I could not find the definition of this "LoadRaw" from the whole swift
v4.
Can anyone give me a hint where its implementation is?
Thanks,
Sam Ding,
Linux on z Systems Open Source Ecosystem
IBM Toronto Lab,
email: samding at ca.ibm.com
phone: (905)413-2947
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170928/ac6e5be2/attachment.html>
More information about the swift-dev
mailing list