Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for writeBarrier (0.15 sec)

  1. src/cmd/compile/internal/ssa/writebarrier.go

    	// to record the old value in *ptr.
    	return z.mask>>uint(off/ptrSize)&1 == 0
    }
    
    // writebarrier pass inserts write barriers for store ops (Store, Move, Zero)
    // when necessary (the condition above). It rewrites store ops to branches
    // and runtime calls, like
    //
    //	if writeBarrier.enabled {
    //		buf := gcWriteBarrier2()	// Not a regular Go call
    //		buf[0] = val
    //		buf[1] = *ptr
    //	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:09:14 UTC 2023
    - 23.5K bytes
    - Viewed (0)
  2. src/runtime/mbarrier.go

    // See go.dev/issue/67401.
    //
    //go:linkname typedmemmove
    //go:nosplit
    func typedmemmove(typ *abi.Type, dst, src unsafe.Pointer) {
    	if dst == src {
    		return
    	}
    	if writeBarrier.enabled && typ.Pointers() {
    		// This always copies a full value of type typ so it's safe
    		// to pass typ along as an optimization. See the comment on
    		// bulkBarrierPreWrite.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  3. src/runtime/slice.go

    		}
    	} else {
    		// Note: can't use rawmem (which avoids zeroing of memory), because then GC can scan uninitialized memory.
    		to = mallocgc(tomem, et, true)
    		if copymem > 0 && writeBarrier.enabled {
    			// Only shade the pointers in old.array since we know the destination slice to
    			// only contains nil pointers because it has been cleared during alloc.
    			//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/compile.go

    	{name: "check bce", fn: checkbce},
    	{name: "branchelim", fn: branchelim},
    	{name: "late fuse", fn: fuseLate},
    	{name: "dse", fn: dse},
    	{name: "memcombine", fn: memcombine},
    	{name: "writebarrier", fn: writebarrier, required: true}, // expand write barrier ops
    	{name: "insert resched checks", fn: insertLoopReschedChecks,
    		disabled: !buildcfg.Experiment.PreemptibleLoops}, // insert resched checks in loops.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    func chanrecv2(hchan <-chan any, elem *any) bool
    func chansend1(hchan chan<- any, elem *any)
    func closechan(hchan chan<- any)
    func chanlen(hchan any) int
    func chancap(hchan any) int
    
    var writeBarrier struct {
    	enabled bool
    	pad     [3]byte
    	cgo     bool
    	alignme uint64
    }
    
    // *byte is really *runtime.Type
    func typedmemmove(typ *byte, dst *any, src *any)
    func typedmemclr(typ *byte, dst *any)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  6. src/runtime/map_fast32.go

    				}
    				dst.b.tophash[dst.i&(abi.MapBucketCount-1)] = top // mask dst.i as an optimization, to avoid a bounds check
    
    				// Copy key.
    				if goarch.PtrSize == 4 && t.Key.Pointers() && writeBarrier.enabled {
    					// Write with a write barrier.
    					*(*unsafe.Pointer)(dst.k) = *(*unsafe.Pointer)(k)
    				} else {
    					*(*uint32)(dst.k) = *(*uint32)(k)
    				}
    
    				typedmemmove(t.Elem, dst.e, e)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  7. src/runtime/map_fast64.go

    					dst.e = add(dst.k, abi.MapBucketCount*8)
    				}
    				dst.b.tophash[dst.i&(abi.MapBucketCount-1)] = top // mask dst.i as an optimization, to avoid a bounds check
    
    				// Copy key.
    				if t.Key.Pointers() && writeBarrier.enabled {
    					if goarch.PtrSize == 8 {
    						// Write with a write barrier.
    						*(*unsafe.Pointer)(dst.k) = *(*unsafe.Pointer)(k)
    					} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/builtin.go

    	{"makechan", funcTag, 99},
    	{"chanrecv1", funcTag, 101},
    	{"chanrecv2", funcTag, 102},
    	{"chansend1", funcTag, 104},
    	{"closechan", funcTag, 105},
    	{"chanlen", funcTag, 106},
    	{"chancap", funcTag, 106},
    	{"writeBarrier", varTag, 108},
    	{"typedmemmove", funcTag, 109},
    	{"typedmemclr", funcTag, 110},
    	{"typedslicecopy", funcTag, 111},
    	{"selectnbsend", funcTag, 112},
    	{"selectnbrecv", funcTag, 113},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  9. test/codegen/comparisons.go

    	// amd64:`CMPQ\t\(.*\), [$]7`
    	return *p < 7
    }
    
    func CmpMem4(p *int) bool {
    	// amd64:`CMPQ\t\(.*\), [$]7`
    	return 7 < *p
    }
    
    func CmpMem5(p **int) {
    	// amd64:`CMPL\truntime.writeBarrier\(SB\), [$]0`
    	*p = nil
    }
    
    func CmpMem6(a []int) int {
    	// 386:`CMPL\s8\([A-Z]+\),`
    	// amd64:`CMPQ\s16\([A-Z]+\),`
    	if a[1] > a[2] {
    		return 1
    	} else {
    		return 2
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 16:31:02 UTC 2024
    - 15.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/liveness/plive.go

    					if sym, ok := v.Aux.(*obj.LSym); ok && sym == ir.Syms.WriteBarrier {
    						load = v
    						break
    					}
    					// Some architectures have to materialize the address separate from
    					// the load.
    					if sym, ok := v.Args[0].Aux.(*obj.LSym); ok && sym == ir.Syms.WriteBarrier {
    						load = v
    						break
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 15:22:22 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top