Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for trailingZeros (0.21 sec)

  1. test/codegen/mathbits.go

    	// arm64:"RORW"
    	// ppc64x:"ROTLW"
    	// s390x:"RLL"
    	// wasm:"I32Rotl"
    	return bits.RotateLeft32(n, m)
    }
    
    // ------------------------ //
    //    bits.TrailingZeros    //
    // ------------------------ //
    
    func TrailingZeros(n uint) int {
    	// amd64/v1,amd64/v2:"BSFQ","MOVL\t\\$64","CMOVQEQ"
    	// amd64/v3:"TZCNTQ"
    	// 386:"BSFL"
    	// arm:"CLZ"
    	// arm64:"RBIT","CLZ"
    	// s390x:"FLOGR"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:51:17 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  2. src/strconv/itoa.go

    		// less than 8 which is smaller than any register width. This allows
    		// the compiler to generate better code for the shift operation.
    		shift := uint(bits.TrailingZeros(uint(base))) & 7
    		b := uint64(base)
    		m := uint(base) - 1 // == 1<<shift - 1
    		for u >= b {
    			i--
    			a[i] = digits[uint(u)&m]
    			u >>= shift
    		}
    		// u < base
    		i--
    		a[i] = digits[uint(u)]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. src/runtime/mksizeclasses.go

    		spanSize := c.npages * pageSize
    		objects := spanSize / c.size
    		tailWaste := spanSize - c.size*(spanSize/c.size)
    		maxWaste := float64((c.size-prevSize-1)*objects+tailWaste) / float64(spanSize)
    		alignBits := bits.TrailingZeros(uint(c.size))
    		if alignBits > pageShift {
    			// object alignment is capped at page alignment
    			alignBits = pageShift
    		}
    		for i := range minAligns {
    			if i > alignBits {
    				minAligns[i] = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:31:27 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/magic.go

    func udivisibleOK32(c int32) bool { return udivisibleOK(32, int64(c)) }
    func udivisibleOK64(c int64) bool { return udivisibleOK(64, c) }
    
    type udivisibleData struct {
    	k   int64  // trailingZeros(c)
    	m   uint64 // m * (c>>k) mod 2^n == 1 multiplicative inverse of odd portion modulo 2^n
    	max uint64 // ⎣(2^n - 1)/ c⎦ max value to for divisibility
    }
    
    func udivisible(n uint, c int64) udivisibleData {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:25 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  5. src/math/big/nat.go

    	for x[i] == 0 {
    		i++
    	}
    	// x[i] != 0
    	return i*_W + uint(bits.TrailingZeros(uint(x[i])))
    }
    
    // isPow2 returns i, true when x == 2**i and 0, false otherwise.
    func (x nat) isPow2() (uint, bool) {
    	var i uint
    	for x[i] == 0 {
    		i++
    	}
    	if i == uint(len(x))-1 && x[i]&(x[i]-1) == 0 {
    		return i*_W + uint(bits.TrailingZeros(uint(x[i]))), true
    	}
    	return 0, false
    }
    
    func same(x, y nat) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:31:58 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"RotateLeft64", Func, 9},
    		{"RotateLeft8", Func, 9},
    		{"Sub", Func, 12},
    		{"Sub32", Func, 12},
    		{"Sub64", Func, 12},
    		{"TrailingZeros", Func, 9},
    		{"TrailingZeros16", Func, 9},
    		{"TrailingZeros32", Func, 9},
    		{"TrailingZeros64", Func, 9},
    		{"TrailingZeros8", Func, 9},
    		{"UintSize", Const, 9},
    	},
    	"math/cmplx": {
    		{"Abs", Func, 0},
    		{"Acos", Func, 0},
    		{"Acosh", Func, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  7. src/runtime/stack.go

    			}
    		}
    		b := *(addb(bv.bytedata, i/8))
    		for b != 0 {
    			j := uintptr(sys.TrailingZeros8(b))
    			b &= b - 1
    			pp := (*uintptr)(add(scanp, (i+j)*goarch.PtrSize))
    		retry:
    			p := *pp
    			if f.valid() && 0 < p && p < minLegalPointer && debug.invalidptr != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssagen/ssa.go

    		},
    		sys.MIPS)
    	addF("math/bits", "TrailingZeros8",
    		func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value {
    			return s.newValue1(ssa.OpCtz8, types.Types[types.TINT], args[0])
    		},
    		sys.AMD64, sys.I386, sys.ARM, sys.ARM64, sys.Wasm)
    	addF("math/bits", "TrailingZeros8",
    		func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/rewrite.go

    func ntz32(x int32) int { return bits.TrailingZeros32(uint32(x)) }
    func ntz16(x int16) int { return bits.TrailingZeros16(uint16(x)) }
    func ntz8(x int8) int   { return bits.TrailingZeros8(uint8(x)) }
    
    func oneBit(x int64) bool   { return x&(x-1) == 0 && x != 0 }
    func oneBit8(x int8) bool   { return x&(x-1) == 0 && x != 0 }
    func oneBit16(x int16) bool { return x&(x-1) == 0 && x != 0 }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
Back to top