1
0
mirror of https://github.com/golang/go synced 2024-10-02 04:28:33 -06:00
go/src/runtime/unaligned1.go
Michael Munday 0f08dd2183 runtime: add s390x support (modified files only)
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>
2016-04-06 04:25:06 +00:00

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)
}