Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 475 for Shift2 (0.15 sec)

  1. test/codegen/bitfield.go

    	return x<<7 ^ x2>>25 // arm64:"EXTRW\t[$]25,"
    }
    
    // check 32-bit shift masking
    func mask32(x uint32) uint32 {
    	return (x << 29) >> 29 // arm64:"AND\t[$]7, R[0-9]+",-"LSR",-"LSL"
    }
    
    // check 16-bit shift masking
    func mask16(x uint16) uint16 {
    	return (x << 14) >> 14 // arm64:"AND\t[$]3, R[0-9]+",-"LSR",-"LSL"
    }
    
    // check 8-bit shift masking
    func mask8(x uint8) uint8 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 06:11:32 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  2. cmd/metacache-entries_test.go

    "src/compress/flate/testdata/huffman-rand-max.in", "src/compress/flate/testdata/huffman-shifts.dyn.expect", "src/compress/flate/testdata/huffman-shifts.dyn.expect-noinput", "src/compress/flate/testdata/huffman-shifts.golden", "src/compress/flate/testdata/huffman-shifts.in", "src/compress/flate/testdata/huffman-shifts.wb.expect", "src/compress/flate/testdata/huffman-shifts.wb.expect-noinput", "src/compress/flate/testdata/huffman-text-shift.dyn.expect", "src/compress/flate/testdata/huffman-text-shift.dyn.expect-noinput",...
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 31.6K bytes
    - Viewed (0)
  3. test/fixedbugs/issue28079c.go

    // license that can be found in the LICENSE file.
    
    // Non-Go-constant but constant values aren't ok for shifts.
    
    package p
    
    import "unsafe"
    
    func f() {
    	_ = complex(1<<uintptr(unsafe.Pointer(nil)), 0) // ERROR "invalid operation: shifted operand 1 \(type float64\) must be integer|non-integer type for left operand of shift"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 28 22:28:41 UTC 2022
    - 451 bytes
    - Viewed (0)
  4. src/internal/types/testdata/fixedbugs/issue52031.go

    // Example from #52031.
    //
    // The following shifts should not produce errors on Go < 1.13, as their
    // untyped constant operands are representable by type uint.
    const (
    	_ resultFlags = (1 << iota) / 2
    
    	reportEqual
    	reportUnequal
    	reportByIgnore
    	reportByMethod
    	reportByFunc
    	reportByCycle
    )
    
    // Invalid cases.
    var x int = 1
    var _ = (8 << x /* ERRORx `signed shift count .* requires go1.13 or later` */)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 733 bytes
    - Viewed (0)
  5. cmd/metacache-stream_test.go

    "src/compress/flate/testdata/huffman-rand-max.in", "src/compress/flate/testdata/huffman-shifts.dyn.expect", "src/compress/flate/testdata/huffman-shifts.dyn.expect-noinput", "src/compress/flate/testdata/huffman-shifts.golden", "src/compress/flate/testdata/huffman-shifts.in", "src/compress/flate/testdata/huffman-shifts.wb.expect", "src/compress/flate/testdata/huffman-shifts.wb.expect-noinput", "src/compress/flate/testdata/huffman-text-shift.dyn.expect", "src/compress/flate/testdata/huffman-text-shift.dyn.expect-noinput",...
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 15K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/_gen/dec64.rules

    (Rsh64x64 [c] x (Int64Make (Const32 [0]) lo)) => (Rsh64x32 [c] x lo)
    (Rsh64Ux64 [c] x (Int64Make (Const32 [0]) lo)) => (Rsh64Ux32 [c] x lo)
    
    // turn x64 non-constant shifts to x32 shifts
    // if high 32-bit of the shift is nonzero, make a huge shift
    (Lsh64x64 x (Int64Make hi lo)) && hi.Op != OpConst32 =>
           (Lsh64x32 x (Or32 <typ.UInt32> (Zeromask hi) lo))
    (Rsh64x64 x (Int64Make hi lo)) && hi.Op != OpConst32 =>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 04 19:35:46 UTC 2022
    - 14.2K bytes
    - Viewed (0)
  7. src/strconv/itoa.go

    		// 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)]
    	} else {
    		// general case
    		b := uint64(base)
    		for u >= b {
    			i--
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. src/cmd/internal/obj/ppc64/doc.go

    specified alignment.
    
    6. Shift instructions
    
    The simple scalar shifts on PPC64 expect a shift count that fits in 5 bits for
    32-bit values or 6 bit for 64-bit values. If the shift count is a constant value
    greater than the max then the assembler sets it to the max for that size (31 for
    32 bit values, 63 for 64 bit values). If the shift count is in a register, then
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 21 16:47:45 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  9. src/math/fma.go

    	sign = uint32(b >> 63)
    	exp = int32(b>>52) & mask
    	mantissa = b & fracMask
    
    	if exp == 0 {
    		// Normalize value if subnormal.
    		shift := uint(bits.LeadingZeros64(mantissa) - 11)
    		mantissa <<= shift
    		exp = 1 - int32(shift)
    	} else {
    		// Add implicit 1 bit
    		mantissa |= 1 << 52
    	}
    	return
    }
    
    // FMA returns x * y + z, computed with only one rounding.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 05 22:05:30 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/test/shift_test.go

    	if one16<<N<<N == 1 {
    		t.Errorf("shift overflow mishandled")
    	}
    	if one16>>N>>N == 1 {
    		t.Errorf("shift overflow mishandled")
    	}
    	if one16u>>N>>N == 1 {
    		t.Errorf("shift overflow mishandled")
    	}
    	if one8<<N<<N == 1 {
    		t.Errorf("shift overflow mishandled")
    	}
    	if one8>>N>>N == 1 {
    		t.Errorf("shift overflow mishandled")
    	}
    	if one8u>>N>>N == 1 {
    		t.Errorf("shift overflow mishandled")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 22:26:39 UTC 2023
    - 25.6K bytes
    - Viewed (0)
Back to top