Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 18 of 18 for TrailingZeros32 (0.24 sec)

  1. src/math/bits/bits_test.go

    				}
    				if got != want {
    					t.Fatalf("TrailingZeros16(%#04x) == %d; want %d", x, got, want)
    				}
    			}
    
    			if x <= 1<<32-1 {
    				got := TrailingZeros32(uint32(x))
    				if x == 0 {
    					want = 32
    				}
    				if got != want {
    					t.Fatalf("TrailingZeros32(%#08x) == %d; want %d", x, got, want)
    				}
    				if UintSize == 32 {
    					got = TrailingZeros(uint(x))
    					if got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 22 20:11:06 UTC 2020
    - 32.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/amd64/versions_test.go

    		if got := bits.TrailingZeros64(tt.x); got != tt.want {
    			t.Errorf("TrailingZeros64(%#x) = %d, want %d", tt.x, got, tt.want)
    		}
    		want := tt.want
    		if want == 64 {
    			want = 32
    		}
    		if got := bits.TrailingZeros32(uint32(tt.x)); got != want {
    			t.Errorf("TrailingZeros64(%#x) = %d, want %d", tt.x, got, want)
    		}
    	}
    }
    
    func TestRound(t *testing.T) {
    	for _, tt := range []struct {
    		x, want float64
    	}{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:19:15 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  3. src/runtime/slice.go

    		var shift uintptr
    		if goarch.PtrSize == 8 {
    			// Mask shift for better code generation.
    			shift = uintptr(sys.TrailingZeros64(uint64(et.Size_))) & 63
    		} else {
    			shift = uintptr(sys.TrailingZeros32(uint32(et.Size_))) & 31
    		}
    		lenmem = uintptr(oldLen) << shift
    		newlenmem = uintptr(newLen) << shift
    		capmem = roundupsize(uintptr(newcap)<<shift, noscan)
    		overflow = uintptr(newcap) > (maxAlloc >> shift)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/rewrite.go

    		panic(fmt.Sprintf("invalid PPC64 rotate mask: %x %d %d", uint64(mask), rotate, nbits))
    	} else if nbits == 32 {
    		mb = bits.LeadingZeros32(uint32(mask))
    		me = 32 - bits.TrailingZeros32(uint32(mask))
    		mbn = bits.LeadingZeros32(^uint32(mask))
    		men = 32 - bits.TrailingZeros32(^uint32(mask))
    	} else {
    		mb = bits.LeadingZeros64(uint64(mask))
    		me = 64 - bits.TrailingZeros64(uint64(mask))
    		mbn = bits.LeadingZeros64(^uint64(mask))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
  5. src/runtime/mbitmap.go

    	// TESTQ/JEQ
    	if tp.mask == 0 {
    		return tp, 0
    	}
    	// BSFQ
    	var i int
    	if goarch.PtrSize == 8 {
    		i = sys.TrailingZeros64(uint64(tp.mask))
    	} else {
    		i = sys.TrailingZeros32(uint32(tp.mask))
    	}
    	// BTCQ
    	tp.mask ^= uintptr(1) << (i & (ptrBits - 1))
    	// LEAQ (XX)(XX*8)
    	return tp, tp.addr + uintptr(i)*goarch.PtrSize
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  6. src/cmd/internal/obj/ppc64/asm9.go

    //
    // Note, me is inclusive.
    func decodeMask32(mask uint32) (mb, me uint32, valid bool) {
    	mb = uint32(bits.LeadingZeros32(mask))
    	me = uint32(32 - bits.TrailingZeros32(mask))
    	mbn := uint32(bits.LeadingZeros32(^mask))
    	men := uint32(32 - bits.TrailingZeros32(^mask))
    	// Check for a wrapping mask (e.g bits at 0 and 31)
    	if mb == 0 && me == 32 {
    		// swap the inverted values
    		mb, me = men, mbn
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 13:55:28 UTC 2024
    - 156.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssagen/ssa.go

    		sys.AMD64)
    	alias("math/bits", "Div", "math/bits", "Div64", sys.ArchAMD64)
    
    	alias("runtime/internal/sys", "TrailingZeros8", "math/bits", "TrailingZeros8", all...)
    	alias("runtime/internal/sys", "TrailingZeros32", "math/bits", "TrailingZeros32", all...)
    	alias("runtime/internal/sys", "TrailingZeros64", "math/bits", "TrailingZeros64", all...)
    	alias("runtime/internal/sys", "Len8", "math/bits", "Len8", all...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  8. 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)
Back to top