github.com/zach-klippenstein/go@v0.0.0-20150108044943-fcfbeb3adf58/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
     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  }