diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2021-06-17 19:01:08 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2021-06-17 20:42:35 +0000 |
| commit | 9a93072a0709c7940f765774dbde0989425ac499 (patch) | |
| tree | 9da395064ab9e8e5a7ad3039896b292bfe7f9fcb /src/runtime/alg.go | |
| parent | 9c58e399a40d2cc4102245f072438caaf635d495 (diff) | |
| download | go-9a93072a0709c7940f765774dbde0989425ac499.tar.xz | |
[dev.typeparams] runtime/internal/sys: replace BigEndian with goarch.BigEndian [generated]
[git-generate]
cd src/runtime/internal/atomic
gofmt -w -r "sys.BigEndian -> goarch.BigEndian" .
goimports -w *.go
cd ../..
gofmt -w -r "sys.BigEndian -> goarch.BigEndian" .
goimports -w *.go
Change-Id: Iad35d2b367d8defb081a77ca837e7a7c805c2b7b
Reviewed-on: https://go-review.googlesource.com/c/go/+/329190
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/runtime/alg.go')
| -rw-r--r-- | src/runtime/alg.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/alg.go b/src/runtime/alg.go index fe6258cadd..978a3b85dc 100644 --- a/src/runtime/alg.go +++ b/src/runtime/alg.go @@ -7,7 +7,6 @@ package runtime import ( "internal/cpu" "internal/goarch" - "runtime/internal/sys" "unsafe" ) @@ -338,7 +337,7 @@ func initAlgAES() { // Note: These routines perform the read with a native endianness. func readUnaligned32(p unsafe.Pointer) uint32 { q := (*[4]byte)(p) - if sys.BigEndian { + if goarch.BigEndian { return uint32(q[3]) | uint32(q[2])<<8 | uint32(q[1])<<16 | uint32(q[0])<<24 } return uint32(q[0]) | uint32(q[1])<<8 | uint32(q[2])<<16 | uint32(q[3])<<24 @@ -346,7 +345,7 @@ func readUnaligned32(p unsafe.Pointer) uint32 { func readUnaligned64(p unsafe.Pointer) uint64 { q := (*[8]byte)(p) - if sys.BigEndian { + if goarch.BigEndian { return uint64(q[7]) | uint64(q[6])<<8 | uint64(q[5])<<16 | uint64(q[4])<<24 | uint64(q[3])<<32 | uint64(q[2])<<40 | uint64(q[1])<<48 | uint64(q[0])<<56 } |
