mirror of
https://github.com/golang/go
synced 2024-11-19 16:24:45 -07:00
0f08dd2183
Change-Id: Ib79ad4a890994ad64edb1feb79bd242d26b5b08a Reviewed-on: https://go-review.googlesource.com/20945 Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Michael Munday <munday@ca.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
18 lines
395 B
Go
18 lines
395 B
Go
// Copyright 2014 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build 386 amd64 amd64p32 arm64 ppc64 ppc64le s390x
|
|
|
|
package runtime
|
|
|
|
import "unsafe"
|
|
|
|
func readUnaligned32(p unsafe.Pointer) uint32 {
|
|
return *(*uint32)(p)
|
|
}
|
|
|
|
func readUnaligned64(p unsafe.Pointer) uint64 {
|
|
return *(*uint64)(p)
|
|
}
|