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: samd...@ca.ibm.com
phone: (905)413-2947
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to