github.com/pidato/unsafe@v0.1.4/memory/hash/be.go (about)

     1  //go:build arm64be || armbe || mips || mips64 || ppc || ppc64 || s390 || s390x || sparc || sparc64
     2  
     3  package hash
     4  
     5  import "math/bits"
     6  
     7  func read32(b unsafe.Pointer) uint64 {
     8  	return bits.ReverseBytes64(uint64(*(*uint32)(b)))
     9  }
    10  
    11  func read64(p unsafe.Pointer) uint64 {
    12  	return bits.ReverseBytes64(*(*uint64)(p))
    13  }
    14  
    15  //func ReadUint64LE(p unsafe.Pointer) uint64 {
    16  //	return bits.ReverseBytes64(*(*uint64)(p))
    17  //}
    18  //
    19  //func ReadUint64BE(p unsafe.Pointer) uint64 {
    20  //	return *(*uint64)(p)
    21  //}