// If the evicted register isn't used between the start of the block
// and now then there is no reason to even request it on entry. We can
// drop from startRegs in that case.
- if s.usedSinceBlockStart&(regMask(1) << r) == 0 {
- if s.startRegsMask&(regMask(1) << r) == 1 {
+ if s.usedSinceBlockStart&(regMask(1)<<r) == 0 {
+ if s.startRegsMask&(regMask(1)<<r) == 1 {
if s.f.pass.debug > regDebug {
fmt.Printf("dropped from startRegs: %s\n", &s.registers[r])
}
if c := countRegs(s.startRegsMask); c != len(s.startRegs[b.ID]) {
regs := make([]startReg, 0, c)
for _, sr := range s.startRegs[b.ID] {
- if s.startRegsMask&(regMask(1) << sr.r) == 0 {
+ if s.startRegsMask&(regMask(1)<<sr.r) == 0 {
continue
}
regs = append(regs, sr)
// Any GODEBUG setting that can call IncNonDefault must be listed
// in three more places:
//
-// - the table in ../runtime/metrics.go (search for non-default-behavior)
-// - the table in ../../runtime/metrics/description.go (search for non-default-behavior; run 'go generate' afterward)
-// - the table in ../../cmd/go/internal/load/godebug.go (search for defaultGodebugs)
+// - the table in ../runtime/metrics.go (search for non-default-behavior)
+// - the table in ../../runtime/metrics/description.go (search for non-default-behavior; run 'go generate' afterward)
+// - the table in ../../cmd/go/internal/load/godebug.go (search for defaultGodebugs)
func (s *Setting) IncNonDefault() {
s.nonDefaultOnce.Do(s.register)
s.nonDefault.Add(1)
// setNewNonDefaultInc is provided by package runtime.
// The runtime can do
+//
// inc := newNonDefaultInc(name)
+//
// instead of
+//
// inc := godebug.New(name).IncNonDefault
+//
// since it cannot import godebug.
//
//go:linkname setNewIncNonDefault
// size is the number of bytes to copy.
// It throws if the program is copying a block that contains a Go pointer
// into non-Go memory.
+//
//go:nosplit
//go:nowritebarrier
func cgoCheckMemmove2(typ *_type, dst, src unsafe.Pointer, off, size uintptr) {
}
// provided by runtime
+//
//go:linkname storePointer
func storePointer(ptr *unsafe.Pointer, new unsafe.Pointer)
}
// Store updates the value atomically.
+//
//go:nosplit
func (p *Pointer[T]) Store(value *T) {
p.u.Store(unsafe.Pointer(value))
// wbZero performs the write barrier operations necessary before
// zeroing a region of memory at address dst of type typ.
// Does not actually do the zeroing.
+//
//go:nowritebarrierrec
//go:nosplit
func wbZero(typ *_type, dst unsafe.Pointer) {
// wbMove performs the write barrier operations necessary before
// copying a region of memory from src to dst of type typ.
// Does not actually do the copying.
+//
//go:nowritebarrierrec
//go:nosplit
func wbMove(typ *_type, dst, src unsafe.Pointer) {
)
// Implemented in the runtime.
+//
//go:linkname runtime_readMetricNames
func runtime_readMetricNames() []string
// optimizations are disabled.
testenv.SkipIfOptimizationOff(t)
- testCases := []struct{
+ testCases := []struct {
name string
fn func() int
want int