- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for umagicOK (0.32 sec)
-
src/cmd/compile/internal/ssa/magic_test.go
} } } } func testMagicExhaustiveU(t *testing.T, n uint) { max := uint64(1) << n for c := uint64(1); c < max; c++ { if !umagicOK(n, int64(c)) { continue } m := umagic(n, int64(c)).m s := umagic(n, int64(c)).s for i := uint64(0); i < max; i++ { want := i / c got := (i * (max + m)) >> (n + uint(s)) if want != got {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 30 22:02:07 UTC 2019 - 9.1K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/magic.go
} M.SetBit(M, int(n), 0) m := M.Uint64() return umagicData{s: int64(s), m: m} } func umagic8(c int8) umagicData { return umagic(8, int64(c)) } func umagic16(c int16) umagicData { return umagic(16, int64(c)) } func umagic32(c int32) umagicData { return umagic(32, int64(c)) } func umagic64(c int64) umagicData { return umagic(64, c) } // For signed division, we use a similar strategy. // First, we enforce a positive c.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:25 UTC 2024 - 15.8K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/generic.rules
(ZeroExt16to32 x)) (Const64 <typ.UInt64> [16+umagic16(c).s-1]))) (Div16u x (Const16 [c])) && umagicOK16(c) && config.RegSize == 4 && c&1 == 0 => (Trunc32to16 (Rsh32Ux64 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(1<<15+(umagic16(c).m+1)/2)]) (Rsh32Ux64 <typ.UInt32> (ZeroExt16to32 x) (Const64 <typ.UInt64> [1])))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 22:21:05 UTC 2024 - 135.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewritegeneric.go
// result: (Trunc32to16 (Rsh32Ux64 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(1<<15+umagic16(c).m/2)]) (ZeroExt16to32 x)) (Const64 <typ.UInt64> [16+umagic16(c).s-1]))) for { x := v_0 if v_1.Op != OpConst16 { break } c := auxIntToInt16(v_1.AuxInt) if !(umagicOK16(c) && config.RegSize == 4 && umagic16(c).m&1 == 0) { break }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:24:47 UTC 2024 - 812.2K bytes - Viewed (0)