3
// Copyright 2012 The Go Authors. All rights reserved.
4
// Use of this source code is governed by a BSD-style
5
// license that can be found in the LICENSE file.
7
// Issue 4448: 64-bit indices that are statically known
8
// to be bounded make 5g and 8g generate a dangling branch.
12
const b26 uint64 = 0x022fdd63cc95386d
17
for p := uint(0); p < 64; p++ {
18
bitPos[b26<<p>>58] = int(p)
22
func MinPos(w uint64) int {
24
panic("bit: MinPos(0) undefined")
26
return bitPos[((w&-w)*b26)>>58]
31
for i := 0; i < 64; i++ {
32
if MinPos(1<<uint(i)) != i {
34
panic("MinPos(1<<uint(i)) != i")