1 // Copyright 2016 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.
8 func builtinCtz32(uint32) int32
10 //extern __builtin_ctzll
11 func builtinCtz64(uint64) int32
15 // Ctz64 counts trailing (low-order) zeroes,
16 // and if all are zero, then 64.
17 func Ctz64(x
uint64) int {
21 return int(builtinCtz64(x
))
26 // Ctz32 counts trailing (low-order) zeroes,
27 // and if all are zero, then 32.
28 func Ctz32(x
uint32) int {
32 return int(builtinCtz32(x
))
35 //extern __builtin_bswap64
36 func bswap64(uint64) uint64
40 // Bswap64 returns its input with byte order reversed
41 // 0x0102030405060708 -> 0x0807060504030201
42 func Bswap64(x
uint64) uint64 {
46 //extern __builtin_bswap32
47 func bswap32(uint32) uint32
51 // Bswap32 returns its input with byte order reversed
52 // 0x01020304 -> 0x04030201
53 func Bswap32(x
uint32) uint32 {