Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Bswap64 (0.4 sec)

  1. test/intrinsic.dir/main.go

    	for i := range A {
    		x := A[i]
    		y := B[i]
    		X := T.Bswap64(x) // ERROR "intrinsic substitution for Bswap64"
    		Y := T.Bswap64(y) // ERROR "intrinsic substitution for Bswap64"
    		if y != X {
    			logf("Bswap64(0x%08x) expected 0x%08x but got 0x%08x\n", x, y, X)
    		}
    		if x != Y {
    			logf("Bswap64(0x%08x) expected 0x%08x but got 0x%08x\n", y, x, Y)
    		}
    
    		x32 := uint32(X)
    		y32 := uint32(Y >> 32)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 18 18:06:27 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  2. src/runtime/internal/sys/intrinsics_test.go

    		if got := sys.TrailingZeros32(x); got != i {
    			t.Errorf("TrailingZeros32(%d)=%d, want %d", x, got, i)
    		}
    	}
    }
    
    func TestBswap64(t *testing.T) {
    	x := uint64(0x1122334455667788)
    	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 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 984 bytes
    - Viewed (0)
  3. src/runtime/internal/sys/intrinsics.go

    // Len8 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
    func Len8(x uint8) int {
    	return int(len8tab[x])
    }
    
    // Bswap64 returns its input with byte order reversed
    // 0x0102030405060708 -> 0x0807060504030201
    func Bswap64(x uint64) uint64 {
    	c8 := uint64(0x00ff00ff00ff00ff)
    	a := x >> 8 & c8
    	b := (x & c8) << 8
    	x = a | b
    	c16 := uint64(0x0000ffff0000ffff)
    	a = x >> 16 & c16
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 14 08:10:45 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/config.go

    	BigEndian      bool        //
    	UseFMA         bool        // Use hardware FMA operation
    	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
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 16:11:47 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/dec64.rules

    (BitLen64 x) =>
    	(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))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 04 19:35:46 UTC 2022
    - 14.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/_gen/PPC64.rules

    (Bswap(32|16) x:(MOV(W|H)Zloadidx ptr idx      mem)) => @x.Block (MOV(W|H)BRloadidx ptr idx mem)
    (Bswap64 x:(MOVDload [off] {sym} ptr mem)) => @x.Block (MOVDBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)
    (Bswap64 x:(MOVDloadidx ptr idx      mem)) => @x.Block (MOVDBRloadidx ptr idx mem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 53.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/_gen/genericOps.go

    	{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)
  8. 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
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  9. src/runtime/mbitmap.go

    // Read is little-endian.
    func readUintptr(p *byte) uintptr {
    	x := *(*uintptr)(unsafe.Pointer(p))
    	if goarch.BigEndian {
    		if goarch.PtrSize == 8 {
    			return uintptr(sys.Bswap64(uint64(x)))
    		}
    		return uintptr(sys.Bswap32(uint32(x)))
    	}
    	return x
    }
    
    var debugPtrmask struct {
    	lock mutex
    	data *byte
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/rewritedec64.go

    		v2.AddArg(v3)
    		v.AddArg2(v0, v2)
    		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)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 19 22:42:34 UTC 2023
    - 65.3K bytes
    - Viewed (0)
Back to top