github.com/fenixara/go@v0.0.0-20170127160404-96ea0918e670/src/runtime/unaligned1.go (about)

     1  // Copyright 2014 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build 386 amd64 amd64p32 arm64 ppc64 ppc64le s390x
     6  
     7  package runtime
     8  
     9  import "unsafe"
    10  
    11  func readUnaligned32(p unsafe.Pointer) uint32 {
    12  	return *(*uint32)(p)
    13  }
    14  
    15  func readUnaligned64(p unsafe.Pointer) uint64 {
    16  	return *(*uint64)(p)
    17  }