diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 010f20bf94..ffaf92debc 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -455,8 +455,8 @@ func mallocinit() { throw("max pointer/scan bitmap size for headerless objects is too large") } - if minTagBits > taggedPointerBits { - throw("taggedPointerBits too small") + if minTagBits > tagBits { + throw("tagBits too small") } // Initialize the heap. diff --git a/src/runtime/netpoll.go b/src/runtime/netpoll.go index b2219b92ce..fab921e2d3 100644 --- a/src/runtime/netpoll.go +++ b/src/runtime/netpoll.go @@ -302,7 +302,7 @@ func (c *pollCache) free(pd *pollDesc) { // Increment the fdseq field, so that any currently // running netpoll calls will not mark pd as ready. fdseq := pd.fdseq.Load() - fdseq = (fdseq + 1) & (1< ptr=", t.pointer(), " tag=", hex(t.tag()), "\n") throw("taggedPointerPack") @@ -80,16 +66,10 @@ func (tp taggedPointer) pointer() unsafe.Pointer { // val before unpacking. return unsafe.Pointer(uintptr(int64(tp) >> tagBits << tagAlignBits)) } - if GOOS == "aix" { - return unsafe.Pointer(uintptr((tp >> aixTagBits << tagAlignBits) | 0xa<<56)) - } - if GOARCH == "riscv64" { - return unsafe.Pointer(uintptr(tp >> riscv64TagBits << tagAlignBits)) - } return unsafe.Pointer(uintptr(tp >> tagBits << tagAlignBits)) } // Tag returns the tag from a taggedPointer. func (tp taggedPointer) tag() uintptr { - return uintptr(tp & (1<