- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for Bswap32 (0.13 sec)
-
test/intrinsic.dir/main.go
} x32 := uint32(X) y32 := uint32(Y >> 32) X32 := T.Bswap32(x32) // ERROR "intrinsic substitution for Bswap32" Y32 := T.Bswap32(y32) // ERROR "intrinsic substitution for Bswap32" if y32 != X32 { logf("Bswap32(0x%08x) expected 0x%08x but got 0x%08x\n", x32, y32, X32) } if x32 != Y32 { logf("Bswap32(0x%08x) expected 0x%08x but got 0x%08x\n", y32, x32, Y32) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 18 18:06:27 UTC 2022 - 2.6K bytes - Viewed (0) -
src/runtime/internal/sys/intrinsics_test.go
y := sys.Bswap64(x) if y != 0x8877665544332211 { t.Errorf("Bswap(%x)=%x, want 0x8877665544332211", x, y) } } func TestBswap32(t *testing.T) { x := uint32(0x11223344) y := sys.Bswap32(x) if y != 0x44332211 { t.Errorf("Bswap(%x)=%x, want 0x44332211", x, y) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 23:34:11 UTC 2023 - 984 bytes - Viewed (0) -
src/cmd/compile/internal/test/inl_test.go
// The same applies to Bswap32. want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "TrailingZeros64") want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "TrailingZeros32") want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "Bswap32") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 09 04:07:57 UTC 2024 - 10.7K bytes - Viewed (0) -
src/runtime/internal/sys/intrinsics.go
b = (x & c16) << 16 x = a | b c32 := uint64(0x00000000ffffffff) a = x >> 32 & c32 b = (x & c32) << 32 x = a | b return x } // Bswap32 returns its input with byte order reversed // 0x01020304 -> 0x04030201 func Bswap32(x uint32) uint32 { c8 := uint32(0x00ff00ff) a := x >> 8 & c8 b := (x & c8) << 8 x = a | b c16 := uint32(0x0000ffff) a = x >> 16 & c16 b = (x & c16) << 16
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 14 08:10:45 UTC 2023 - 7.4K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/dec64.rules
(Add32 <typ.Int> (BitLen32 <typ.Int> (Int64Hi x)) (BitLen32 <typ.Int> (Or32 <typ.UInt32> (Int64Lo x) (Zeromask (Int64Hi x))))) (Bswap64 x) => (Int64Make (Bswap32 <typ.UInt32> (Int64Lo x)) (Bswap32 <typ.UInt32> (Int64Hi x))) (SignExt32to64 x) => (Int64Make (Signmask x) x) (SignExt16to64 x) => (SignExt32to64 (SignExt16to32 x)) (SignExt8to64 x) => (SignExt32to64 (SignExt8to32 x))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 04 19:35:46 UTC 2022 - 14.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/config.go
unalignedOK bool // Unaligned loads/stores are ok haveBswap64 bool // architecture implements Bswap64 haveBswap32 bool // architecture implements Bswap32 haveBswap16 bool // architecture implements Bswap16 } type ( blockRewriter func(*Block) bool valueRewriter func(*Value) bool ) type Types struct { Bool *types.Type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 16:11:47 UTC 2024 - 12.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewritedec64.go
return true } } func rewriteValuedec64_OpBswap64(v *Value) bool { v_0 := v.Args[0] b := v.Block typ := &b.Func.Config.Types // match: (Bswap64 x) // result: (Int64Make (Bswap32 <typ.UInt32> (Int64Lo x)) (Bswap32 <typ.UInt32> (Int64Hi x))) for { x := v_0 v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpBswap32, typ.UInt32) v1 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32) v1.AddArg(x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 19 22:42:34 UTC 2023 - 65.3K bytes - Viewed (0) -
src/runtime/arena.go
// and leaves it alone elsewhere. func bswapIfBigEndian(x uintptr) uintptr { if goarch.BigEndian { if goarch.PtrSize == 8 { return uintptr(sys.Bswap64(uint64(x))) } return uintptr(sys.Bswap32(uint32(x))) } return x } // newUserArenaChunk allocates a user arena chunk, which maps to a single // heap arena and single span. Returns a pointer to the base of the chunk
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:44:56 UTC 2024 - 37.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/genericOps.go
{name: "BitLen32", argLength: 1}, // Number of bits in arg[0] (returns 0-32) {name: "BitLen64", argLength: 1}, // Number of bits in arg[0] (returns 0-64) {name: "Bswap16", argLength: 1}, // Swap bytes {name: "Bswap32", argLength: 1}, // Swap bytes {name: "Bswap64", argLength: 1}, // Swap bytes {name: "BitRev8", argLength: 1}, // Reverse the bits in arg[0] {name: "BitRev16", argLength: 1}, // Reverse the bits in arg[0]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 15:49:20 UTC 2024 - 42.6K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/ARM.rules
// result = t4 ^ t5 -- (d, c, b, a ) // using shifted ops this can be done in 4 instructions. (Bswap32 <t> x) && buildcfg.GOARM.Version==5 => (XOR <t> (SRLconst <t> (BICconst <t> (XOR <t> x (SRRconst <t> [16] x)) [0xff0000]) [8]) (SRRconst <t> x [8])) // byte swap for ARMv6 and above (Bswap32 x) && buildcfg.GOARM.Version>=6 => (REV x) // boolean ops -- booleans are represented with 0=false, 1=true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 17:19:36 UTC 2023 - 90.1K bytes - Viewed (0)