Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 233 for alignment (0.6 sec)

  1. src/unsafe/unsafe.go

    //	e := unsafe.Pointer(uintptr(unsafe.Pointer(&x[0])) + i*unsafe.Sizeof(x[0]))
    //
    // It is valid both to add and to subtract offsets from a pointer in this way.
    // It is also valid to use &^ to round pointers, usually for alignment.
    // In all cases, the result must continue to point into the original allocated object.
    //
    // Unlike in C, it is not valid to advance a pointer just beyond the end of
    // its original allocation:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:45:20 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  2. src/hash/crc32/crc32_test.go

    						benchmark(b, h, int64(size), int64(align))
    					})
    				}
    			})
    		}
    	}
    }
    
    func benchmark(b *testing.B, h hash.Hash32, n, alignment int64) {
    	b.SetBytes(n)
    	data := make([]byte, n+alignment)
    	data = data[alignment:]
    	for i := range data {
    		data[i] = byte(i)
    	}
    	in := make([]byte, 0, h.Size())
    
    	// Warm up
    	h.Reset()
    	h.Write(data)
    	h.Sum(in)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  3. src/internal/runtime/atomic/atomic_mipsx.go

    	pad   [cpu.CacheLinePadSize - 4]byte
    }
    
    //go:noescape
    func spinLock(state *uint32)
    
    //go:noescape
    func spinUnlock(state *uint32)
    
    //go:nosplit
    func lockAndCheck(addr *uint64) {
    	// ensure 8-byte alignment
    	if uintptr(unsafe.Pointer(addr))&7 != 0 {
    		panicUnaligned()
    	}
    	// force dereference before taking lock
    	_ = *addr
    
    	spinLock(&lock.state)
    }
    
    //go:nosplit
    func unlock() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 20:08:37 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/export_test.go

    func init() {
    	// TODO(mdempsky): Push into types.InitUniverse or typecheck.InitUniverse.
    	types.PtrSize = 8
    	types.RegSize = 8
    	types.MaxWidth = 1 << 50
    
    	base.Ctxt = &obj.Link{Arch: &obj.LinkArch{Arch: &sys.Arch{Alignment: 1, CanMergeLoads: true}}}
    	typecheck.InitUniverse()
    	testTypes.SetTypPtrs()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 21:19:39 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/rewritegeneric.go

    	// cond: isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && isSamePtr(p4, p5) && isSamePtr(p5, p6) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && t5.Alignment() <= t1.Alignment() && t6.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && registerizable(b, t5) && n >= o2 + t2.Size() && n >= o3 + t3.Size() && n >= o4 + t4.Size()...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 18:24:47 UTC 2024
    - 812.2K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/data.go

    	// these symbols at the beginning of their respective section if there
    	// aren't real symbols, their alignment might not match the
    	// first symbol alignment. Therefore, there are explicitly put at the
    	// beginning of their section with the same alignment.
    	if !(ctxt.DynlinkingGo() && ctxt.HeadType == objabi.Hdarwin) && !(ctxt.HeadType == objabi.Haix && ctxt.LinkMode == LinkExternal) {
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 12 15:10:50 UTC 2024
    - 100.5K bytes
    - Viewed (0)
  7. src/internal/abi/type.go

    	Hash        uint32  // hash of type; avoids computation in hash tables
    	TFlag       TFlag   // extra type information flags
    	Align_      uint8   // alignment of variable with this type
    	FieldAlign_ uint8   // alignment of struct field with this type
    	Kind_       Kind    // enumeration for C
    	// function for comparing objects of this type
    	// (ptr to object A, ptr to object B) -> ==?
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/test.go

    } issue4054a;
    
    // issue 4339
    // We've historically permitted #include <>, so test it here.  Issue 29333.
    // Also see issue 41059.
    #include <issue4339.h>
    
    // issue 4417
    // cmd/cgo: bool alignment/padding issue.
    // bool alignment is wrong and causing wrong arguments when calling functions.
    static int c_bool(bool a, bool b, int c, bool d, bool e)  {
       return c;
    }
    
    // issue 4857
    #cgo CFLAGS: -Werror
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/mod_tidy_compat_incompatible.txt

    
    # There are two ways for the module author to bring the two into alignment.
    # One is to *explicitly* 'exclude' the version that is already *implicitly*
    # pruned out under 1.17.
    
    go mod edit -exclude=example.com/retract/incompatible@v2.0.0+incompatible
    go list -f $MODFMT -deps ./...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ppc64/ssa.go

    		// eliminates some offset and alignment checking in the rules file.
    
    		fromAddr := obj.Addr{Type: obj.TYPE_MEM, Reg: v.Args[0].Reg()}
    		ssagen.AddAux(&fromAddr, v)
    
    		genAddr := false
    
    		switch fromAddr.Name {
    		case obj.NAME_EXTERN, obj.NAME_STATIC:
    			// Special case for a rule combines the bytes of gostring.
    			// The v alignment might seem OK, but we don't want to load it
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:59:38 UTC 2024
    - 55.4K bytes
    - Viewed (0)
Back to top