]> Cypherpunks repositories - gostls13.git/commitdiff
runtime, sync/atomic: add write barrier for atomic write of pointer
authorRuss Cox <rsc@golang.org>
Tue, 23 Dec 2014 03:50:42 +0000 (22:50 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 6 Jan 2015 00:27:06 +0000 (00:27 +0000)
Add write barrier to atomic operations manipulating pointers.

In general an atomic write of a pointer word may indicate racy accesses,
so there is no strictly safe way to attempt to keep the shadow copy
in sync with the real one. Instead, mark the shadow copy as not used.

Redirect sync/atomic pointer routines back to the runtime ones,
so that there is only one copy of the write barrier and shadow logic.
In time we might consider doing this for most of the sync/atomic
functions, but for now only the pointer routines need that treatment.

Found with GODEBUG=wbshadow=1 mode.
Eventually that will run automatically, but right now
it still detects other missing write barriers.

Change-Id: I852936b9a111a6cb9079cfaf6bd78b43016c0242
Reviewed-on: https://go-review.googlesource.com/2066
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
15 files changed:
src/runtime/atomic_386.go
src/runtime/atomic_amd64x.go
src/runtime/atomic_arm.go
src/runtime/atomic_pointer.go [new file with mode: 0644]
src/runtime/atomic_ppc64x.go
src/runtime/race_amd64.s
src/runtime/stubs.go
src/sync/atomic/asm_386.s
src/sync/atomic/asm_amd64.s
src/sync/atomic/asm_amd64p32.s
src/sync/atomic/asm_freebsd_arm.s
src/sync/atomic/asm_linux_arm.s
src/sync/atomic/asm_nacl_arm.s
src/sync/atomic/asm_netbsd_arm.s
src/sync/atomic/asm_ppc64x.s

index 5563432eff015d3df99071d79105d1ede9350384..0171d907a35a3c710ccaf91b088f13aba26e547f 100644 (file)
@@ -48,18 +48,7 @@ func xadd(ptr *uint32, delta int32) uint32
 //go:noescape
 func xchg(ptr *uint32, new uint32) uint32
 
-// xchgp cannot have a go:noescape annotation, because
-// while ptr does not escape, new does. If new is marked as
-// not escaping, the compiler will make incorrect escape analysis
-// decisions about the value being xchg'ed.
-// Instead, make xchgp a wrapper around the actual atomic.
-// When calling the wrapper we mark ptr as noescape explicitly.
-
-//go:nosplit
-func xchgp(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer {
-       return xchgp1(noescape(ptr), new)
-}
-
+// NO go:noescape annotation; see atomic_pointer.go.
 func xchgp1(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
 
 //go:noescape
@@ -80,12 +69,5 @@ func atomicstore(ptr *uint32, val uint32)
 //go:noescape
 func atomicstore64(ptr *uint64, val uint64)
 
-// atomicstorep cannot have a go:noescape annotation.
-// See comment above for xchgp.
-
-//go:nosplit
-func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
-       atomicstorep1(noescape(ptr), new)
-}
-
+// NO go:noescape annotation; see atomic_pointer.go.
 func atomicstorep1(ptr unsafe.Pointer, val unsafe.Pointer)
index f2dd5841187be852ce170565cfd4f1c25346691a..c5355f6a4e453299ce79bb58289c1038be8fba59 100644 (file)
@@ -42,18 +42,7 @@ func xchg(ptr *uint32, new uint32) uint32
 //go:noescape
 func xchg64(ptr *uint64, new uint64) uint64
 
-// xchgp cannot have a go:noescape annotation, because
-// while ptr does not escape, new does. If new is marked as
-// not escaping, the compiler will make incorrect escape analysis
-// decisions about the value being xchg'ed.
-// Instead, make xchgp a wrapper around the actual atomic.
-// When calling the wrapper we mark ptr as noescape explicitly.
-
-//go:nosplit
-func xchgp(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer {
-       return xchgp1(noescape(ptr), new)
-}
-
+// NO go:noescape annotation; see atomic_pointer.go.
 func xchgp1(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
 
 //go:noescape
@@ -71,12 +60,5 @@ func atomicstore(ptr *uint32, val uint32)
 //go:noescape
 func atomicstore64(ptr *uint64, val uint64)
 
-// atomicstorep cannot have a go:noescape annotation.
-// See comment above for xchgp.
-
-//go:nosplit
-func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
-       atomicstorep1(noescape(ptr), new)
-}
-
+// NO go:noescape annotation; see atomic_pointer.go.
 func atomicstorep1(ptr unsafe.Pointer, val unsafe.Pointer)
index fd55a0aca85927609532f6d1e5963d376ca55c61..7f0b929143a7d011186eae912d4b0e02d8dede5a 100644 (file)
@@ -38,10 +38,10 @@ func xchg(addr *uint32, v uint32) uint32 {
 }
 
 //go:nosplit
-func xchgp(addr *unsafe.Pointer, v unsafe.Pointer) unsafe.Pointer {
+func xchgp1(addr *unsafe.Pointer, v unsafe.Pointer) unsafe.Pointer {
        for {
                old := *addr
-               if casp(addr, old, v) {
+               if casp1(addr, old, v) {
                        return old
                }
        }
@@ -63,10 +63,10 @@ func atomicloadp(addr unsafe.Pointer) unsafe.Pointer {
 }
 
 //go:nosplit
-func atomicstorep(addr unsafe.Pointer, v unsafe.Pointer) {
+func atomicstorep1(addr unsafe.Pointer, v unsafe.Pointer) {
        for {
                old := *(*unsafe.Pointer)(addr)
-               if casp((*unsafe.Pointer)(addr), old, v) {
+               if casp1((*unsafe.Pointer)(addr), old, v) {
                        return
                }
        }
diff --git a/src/runtime/atomic_pointer.go b/src/runtime/atomic_pointer.go
new file mode 100644 (file)
index 0000000..50a3024
--- /dev/null
@@ -0,0 +1,96 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package runtime
+
+import "unsafe"
+
+// These functions cannot have go:noescape annotations,
+// because while ptr does not escape, new does.
+// If new is marked as not escaping, the compiler will make incorrect
+// escape analysis decisions about the pointer value being stored.
+// Instead, these are wrappers around the actual atomics (xchgp1 and so on)
+// that use noescape to convey which arguments do not escape.
+//
+// Additionally, these functions must update the shadow heap for
+// write barrier checking.
+
+//go:nosplit
+func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
+       atomicstorep1(noescape(ptr), new)
+       writebarrierptr_nostore((*uintptr)(ptr), uintptr(new))
+       if mheap_.shadow_enabled {
+               writebarrierptr_noshadow((*uintptr)(noescape(ptr)))
+       }
+}
+
+//go:nosplit
+func xchgp(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer {
+       old := xchgp1(noescape(ptr), new)
+       writebarrierptr_nostore((*uintptr)(ptr), uintptr(new))
+       if mheap_.shadow_enabled {
+               writebarrierptr_noshadow((*uintptr)(noescape(ptr)))
+       }
+       return old
+}
+
+//go:nosplit
+func casp(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
+       if !casp1((*unsafe.Pointer)(noescape(unsafe.Pointer(ptr))), noescape(old), new) {
+               return false
+       }
+       writebarrierptr_nostore((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
+       if mheap_.shadow_enabled {
+               writebarrierptr_noshadow((*uintptr)(noescape(unsafe.Pointer(ptr))))
+       }
+       return true
+}
+
+// Like above, but implement in terms of sync/atomic's uintptr operations.
+// We cannot just call the runtime routines, because the race detector expects
+// to be able to intercept the sync/atomic forms but not the runtime forms.
+
+//go:linkname sync_atomic_StoreUintptr sync/atomic.StoreUintptr
+func sync_atomic_StoreUintptr(ptr *uintptr, new uintptr)
+
+//go:linkname sync_atomic_StorePointer sync/atomic.StorePointer
+//go:nosplit
+func sync_atomic_StorePointer(ptr *unsafe.Pointer, new unsafe.Pointer) {
+       sync_atomic_StoreUintptr((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
+       atomicstorep1(noescape(unsafe.Pointer(ptr)), new)
+       writebarrierptr_nostore((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
+       if mheap_.shadow_enabled {
+               writebarrierptr_noshadow((*uintptr)(noescape(unsafe.Pointer(ptr))))
+       }
+}
+
+//go:linkname sync_atomic_SwapUintptr sync/atomic.SwapUintptr
+func sync_atomic_SwapUintptr(ptr *uintptr, new uintptr) uintptr
+
+//go:linkname sync_atomic_SwapPointer sync/atomic.SwapPointer
+//go:nosplit
+func sync_atomic_SwapPointer(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer {
+       old := unsafe.Pointer(sync_atomic_SwapUintptr((*uintptr)(noescape(ptr)), uintptr(new)))
+       writebarrierptr_nostore((*uintptr)(ptr), uintptr(new))
+       if mheap_.shadow_enabled {
+               writebarrierptr_noshadow((*uintptr)(noescape(ptr)))
+       }
+       return old
+}
+
+//go:linkname sync_atomic_CompareAndSwapUintptr sync/atomic.CompareAndSwapUintptr
+func sync_atomic_CompareAndSwapUintptr(ptr *uintptr, old, new uintptr) bool
+
+//go:linkname sync_atomic_CompareAndSwapPointer sync/atomic.CompareAndSwapPointer
+//go:nosplit
+func sync_atomic_CompareAndSwapPointer(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
+       if !sync_atomic_CompareAndSwapUintptr((*uintptr)(noescape(unsafe.Pointer(ptr))), uintptr(old), uintptr(new)) {
+               return false
+       }
+       writebarrierptr_nostore((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
+       if mheap_.shadow_enabled {
+               writebarrierptr_noshadow((*uintptr)(noescape(unsafe.Pointer(ptr))))
+       }
+       return true
+}
index 4080af6a561f8cecfff23c1a3b768987974b5638..65dd9fc50cbc39c2370eb9e5d4e170a3c032a850 100644 (file)
@@ -20,18 +20,7 @@ func xchg(ptr *uint32, new uint32) uint32
 //go:noescape
 func xchg64(ptr *uint64, new uint64) uint64
 
-// xchgp cannot have a go:noescape annotation, because
-// while ptr does not escape, new does. If new is marked as
-// not escaping, the compiler will make incorrect escape analysis
-// decisions about the value being xchg'ed.
-// Instead, make xchgp a wrapper around the actual atomic.
-// When calling the wrapper we mark ptr as noescape explicitly.
-
-//go:nosplit
-func xchgp(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer {
-       return xchgp1(noescape(ptr), new)
-}
-
+// NO go:noescape annotation; see atomic_pointer.go.
 func xchgp1(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
 
 //go:noescape
@@ -58,12 +47,5 @@ func atomicstore(ptr *uint32, val uint32)
 //go:noescape
 func atomicstore64(ptr *uint64, val uint64)
 
-// atomicstorep cannot have a go:noescape annotation.
-// See comment above for xchgp.
-
-//go:nosplit
-func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
-       atomicstorep1(noescape(ptr), new)
-}
-
+// NO go:noescape annotation; see atomic_pointer.go.
 func atomicstorep1(ptr unsafe.Pointer, val unsafe.Pointer)
index d54d9798f032ccc6c2f8043e3ab9c6d87f008a07..adf557f8a2256bd98c45a9d6b2439b8aeb5e5df9 100644 (file)
@@ -202,9 +202,6 @@ TEXT        sync∕atomic·LoadUint64(SB), NOSPLIT, $0-0
 TEXT   sync∕atomic·LoadUintptr(SB), NOSPLIT, $0-0
        JMP     sync∕atomic·LoadInt64(SB)
 
-TEXT   sync∕atomic·LoadPointer(SB), NOSPLIT, $0-0
-       JMP     sync∕atomic·LoadInt64(SB)
-
 // Store
 TEXT   sync∕atomic·StoreInt32(SB), NOSPLIT, $0-0
        MOVQ    $__tsan_go_atomic32_store(SB), AX
@@ -225,9 +222,6 @@ TEXT        sync∕atomic·StoreUint64(SB), NOSPLIT, $0-0
 TEXT   sync∕atomic·StoreUintptr(SB), NOSPLIT, $0-0
        JMP     sync∕atomic·StoreInt64(SB)
 
-TEXT   sync∕atomic·StorePointer(SB), NOSPLIT, $0-0
-       JMP     sync∕atomic·StoreInt64(SB)
-
 // Swap
 TEXT   sync∕atomic·SwapInt32(SB), NOSPLIT, $0-0
        MOVQ    $__tsan_go_atomic32_exchange(SB), AX
@@ -248,9 +242,6 @@ TEXT        sync∕atomic·SwapUint64(SB), NOSPLIT, $0-0
 TEXT   sync∕atomic·SwapUintptr(SB), NOSPLIT, $0-0
        JMP     sync∕atomic·SwapInt64(SB)
 
-TEXT   sync∕atomic·SwapPointer(SB), NOSPLIT, $0-0
-       JMP     sync∕atomic·SwapInt64(SB)
-
 // Add
 TEXT   sync∕atomic·AddInt32(SB), NOSPLIT, $0-0
        MOVQ    $__tsan_go_atomic32_fetch_add(SB), AX
@@ -275,9 +266,6 @@ TEXT        sync∕atomic·AddUint64(SB), NOSPLIT, $0-0
 TEXT   sync∕atomic·AddUintptr(SB), NOSPLIT, $0-0
        JMP     sync∕atomic·AddInt64(SB)
 
-TEXT   sync∕atomic·AddPointer(SB), NOSPLIT, $0-0
-       JMP     sync∕atomic·AddInt64(SB)
-
 // CompareAndSwap
 TEXT   sync∕atomic·CompareAndSwapInt32(SB), NOSPLIT, $0-0
        MOVQ    $__tsan_go_atomic32_compare_exchange(SB), AX
@@ -298,9 +286,6 @@ TEXT        sync∕atomic·CompareAndSwapUint64(SB), NOSPLIT, $0-0
 TEXT   sync∕atomic·CompareAndSwapUintptr(SB), NOSPLIT, $0-0
        JMP     sync∕atomic·CompareAndSwapInt64(SB)
 
-TEXT   sync∕atomic·CompareAndSwapPointer(SB), NOSPLIT, $0-0
-       JMP     sync∕atomic·CompareAndSwapInt64(SB)
-
 // Generic atomic operation implementation.
 // AX already contains target function.
 TEXT   racecallatomic<>(SB), NOSPLIT, $0-0
index 591ece6b3acb36664d8fa5368571254cf52b2416..67f78bdae5b73ca61467f3a06ba3be4ddab64543 100644 (file)
@@ -118,18 +118,7 @@ func goexit()
 //go:noescape
 func cas(ptr *uint32, old, new uint32) bool
 
-// casp cannot have a go:noescape annotation, because
-// while ptr and old do not escape, new does. If new is marked as
-// not escaping, the compiler will make incorrect escape analysis
-// decisions about the value being xchg'ed.
-// Instead, make casp a wrapper around the actual atomic.
-// When calling the wrapper we mark ptr as noescape explicitly.
-
-//go:nosplit
-func casp(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
-       return casp1((*unsafe.Pointer)(noescape(unsafe.Pointer(ptr))), noescape(old), new)
-}
-
+// NO go:noescape annotation; see atomic_pointer.go.
 func casp1(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
 
 func nop() // call to prevent inlining of function body
index 740dfe76bafa3046c0c96c0268bc26637bc68501..383d759ae78d0ef1eb9e43410c85a65d8ec9e3f6 100644 (file)
@@ -50,9 +50,6 @@ swaploop:
 TEXT ·SwapUintptr(SB),NOSPLIT,$0-12
        JMP     ·SwapUint32(SB)
 
-TEXT ·SwapPointer(SB),NOSPLIT,$0-12
-       JMP     ·SwapUint32(SB)
-
 TEXT ·CompareAndSwapInt32(SB),NOSPLIT,$0-13
        JMP     ·CompareAndSwapUint32(SB)
 
@@ -69,9 +66,6 @@ TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0-13
 TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0-13
        JMP     ·CompareAndSwapUint32(SB)
 
-TEXT ·CompareAndSwapPointer(SB),NOSPLIT,$0-13
-       JMP     ·CompareAndSwapUint32(SB)
-
 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0-21
        JMP     ·CompareAndSwapUint64(SB)
 
@@ -209,6 +203,3 @@ TEXT ·StoreUint64(SB),NOSPLIT,$0-12
 
 TEXT ·StoreUintptr(SB),NOSPLIT,$0-8
        JMP     ·StoreUint32(SB)
-
-TEXT ·StorePointer(SB),NOSPLIT,$0-8
-       JMP     ·StoreUint32(SB)
index 6e53ebedd2ddbc058adad09f945f4efc8531d5d1..551c002674944524df153d86fa7048cd051f7a03 100644 (file)
@@ -29,9 +29,6 @@ TEXT ·SwapUint64(SB),NOSPLIT,$0-24
 TEXT ·SwapUintptr(SB),NOSPLIT,$0-24
        JMP     ·SwapUint64(SB)
 
-TEXT ·SwapPointer(SB),NOSPLIT,$0-24
-       JMP     ·SwapUint64(SB)
-
 TEXT ·CompareAndSwapInt32(SB),NOSPLIT,$0-17
        JMP     ·CompareAndSwapUint32(SB)
 
@@ -47,9 +44,6 @@ TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0-17
 TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0-25
        JMP     ·CompareAndSwapUint64(SB)
 
-TEXT ·CompareAndSwapPointer(SB),NOSPLIT,$0-25
-       JMP     ·CompareAndSwapUint64(SB)
-
 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0-25
        JMP     ·CompareAndSwapUint64(SB)
 
@@ -137,10 +131,4 @@ TEXT ·StoreUint64(SB),NOSPLIT,$0-16
        RET
 
 TEXT ·StoreUintptr(SB),NOSPLIT,$0-16
-       JMP     ·StorePointer(SB)
-
-TEXT ·StorePointer(SB),NOSPLIT,$0-16
-       MOVQ    addr+0(FP), BP
-       MOVQ    val+8(FP), AX
-       XCHGQ   AX, 0(BP)
-       RET
+       JMP     ·StoreUint64(SB)
index d77cc2c0888a90538fd3fe56274a61d9ca03940d..b4e19ee257dc7fbfcd312bdd555ad1b121828aa6 100644 (file)
@@ -30,9 +30,6 @@ TEXT ·SwapUint64(SB),NOSPLIT,$0-24
 TEXT ·SwapUintptr(SB),NOSPLIT,$0-12
        JMP     ·SwapUint32(SB)
 
-TEXT ·SwapPointer(SB),NOSPLIT,$0-12
-       JMP     ·SwapUint32(SB)
-
 TEXT ·CompareAndSwapInt32(SB),NOSPLIT,$0-17
        JMP     ·CompareAndSwapUint32(SB)
 
@@ -48,9 +45,6 @@ TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0-17
 TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0-17
        JMP     ·CompareAndSwapUint32(SB)
 
-TEXT ·CompareAndSwapPointer(SB),NOSPLIT,$0-17
-       JMP     ·CompareAndSwapUint32(SB)
-
 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0-25
        JMP     ·CompareAndSwapUint64(SB)
 
@@ -150,10 +144,4 @@ TEXT ·StoreUint64(SB),NOSPLIT,$0-16
        RET
 
 TEXT ·StoreUintptr(SB),NOSPLIT,$0-8
-       JMP     ·StorePointer(SB)
-
-TEXT ·StorePointer(SB),NOSPLIT,$0-8
-       MOVL    addr+0(FP), BX
-       MOVL    val+4(FP), AX
-       XCHGL   AX, 0(BX)
-       RET
+       JMP     ·StoreUint32(SB)
index 06b975e897a0ba3c2de0e8391c8de698141eadd8..46710eab0110b0cee24691f8dd0d078e76b9550f 100644 (file)
@@ -16,9 +16,6 @@ TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0
 TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0
        B ·CompareAndSwapUint32(SB)
 
-TEXT ·CompareAndSwapPointer(SB),NOSPLIT,$0
-       B ·CompareAndSwapUint32(SB)
-
 TEXT ·AddInt32(SB),NOSPLIT,$0
        B ·AddUint32(SB)
 
@@ -37,9 +34,6 @@ TEXT ·SwapUint32(SB),NOSPLIT,$0
 TEXT ·SwapUintptr(SB),NOSPLIT,$0
        B ·SwapUint32(SB)
 
-TEXT ·SwapPointer(SB),NOSPLIT,$0
-       B ·SwapUint32(SB)
-
 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
        B ·CompareAndSwapUint64(SB)
 
@@ -104,6 +98,3 @@ TEXT ·StoreUint64(SB),NOSPLIT,$0
 
 TEXT ·StoreUintptr(SB),NOSPLIT,$0
        B ·StoreUint32(SB)
-
-TEXT ·StorePointer(SB),NOSPLIT,$0
-       B ·StoreUint32(SB)
index 944758441a84c5bb373934287332763d0f74d666..b388e4c55005483716ee9537ba545a76e02bb736 100644 (file)
@@ -57,9 +57,6 @@ cascheck:
 TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0
        B       ·CompareAndSwapUint32(SB)
 
-TEXT ·CompareAndSwapPointer(SB),NOSPLIT,$0
-       B       ·CompareAndSwapUint32(SB)
-
 TEXT ·AddInt32(SB),NOSPLIT,$0
        B       ·AddUint32(SB)
 
@@ -97,9 +94,6 @@ swaploop1:
 TEXT ·SwapUintptr(SB),NOSPLIT,$0
        B       ·SwapUint32(SB)
 
-TEXT ·SwapPointer(SB),NOSPLIT,$0
-       B       ·SwapUint32(SB)
-
 TEXT cas64<>(SB),NOSPLIT,$0
        MOVW    $0xffff0f60, PC // __kuser_cmpxchg64: Linux-3.1 and above
 
@@ -211,6 +205,3 @@ TEXT ·StoreUint64(SB),NOSPLIT,$0
 
 TEXT ·StoreUintptr(SB),NOSPLIT,$0
        B       ·StoreUint32(SB)
-
-TEXT ·StorePointer(SB),NOSPLIT,$0
-       B       ·StoreUint32(SB)
index 76f6233364511c3eb44c67d2225a5da76d697391..8b4b6872a6e4c561a49506d5bc253851b9813d5d 100644 (file)
@@ -16,9 +16,6 @@ TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0
 TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0
        B ·CompareAndSwapUint32(SB)
 
-TEXT ·CompareAndSwapPointer(SB),NOSPLIT,$0
-       B ·CompareAndSwapUint32(SB)
-
 TEXT ·AddInt32(SB),NOSPLIT,$0
        B ·AddUint32(SB)
 
@@ -37,9 +34,6 @@ TEXT ·SwapUint32(SB),NOSPLIT,$0
 TEXT ·SwapUintptr(SB),NOSPLIT,$0
        B ·SwapUint32(SB)
 
-TEXT ·SwapPointer(SB),NOSPLIT,$0
-       B ·SwapUint32(SB)
-
 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
        B ·CompareAndSwapUint64(SB)
 
@@ -104,6 +98,3 @@ TEXT ·StoreUint64(SB),NOSPLIT,$0
 
 TEXT ·StoreUintptr(SB),NOSPLIT,$0
        B ·StoreUint32(SB)
-
-TEXT ·StorePointer(SB),NOSPLIT,$0
-       B ·StoreUint32(SB)
index dbe80898fd4cf4d8b5b955422c24925f83dd498c..5c98de33c6e8dd239a2eb2dd4d8eef02a29df625 100644 (file)
@@ -16,9 +16,6 @@ TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0
 TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0
        B ·CompareAndSwapUint32(SB)
 
-TEXT ·CompareAndSwapPointer(SB),NOSPLIT,$0
-       B ·CompareAndSwapUint32(SB)
-
 TEXT ·AddInt32(SB),NOSPLIT,$0
        B ·AddUint32(SB)
 
@@ -37,9 +34,6 @@ TEXT ·SwapUint32(SB),NOSPLIT,$0
 TEXT ·SwapUintptr(SB),NOSPLIT,$0
        B ·SwapUint32(SB)
 
-TEXT ·SwapPointer(SB),NOSPLIT,$0
-       B ·SwapUint32(SB)
-
 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
        B ·CompareAndSwapUint64(SB)
 
@@ -104,6 +98,3 @@ TEXT ·StoreUint64(SB),NOSPLIT,$0
 
 TEXT ·StoreUintptr(SB),NOSPLIT,$0
        B ·StoreUint32(SB)
-
-TEXT ·StorePointer(SB),NOSPLIT,$0
-       B ·StoreUint32(SB)
index bcd46c5cfff1afe7f193fb134ccc50116fd90e78..00e1afb78fb70e76aef54df647d7b05eac0cdda8 100644 (file)
@@ -39,9 +39,6 @@ TEXT ·SwapUint64(SB),NOSPLIT,$0-24
 TEXT ·SwapUintptr(SB),NOSPLIT,$0-24
        BR      ·SwapUint64(SB)
 
-TEXT ·SwapPointer(SB),NOSPLIT,$0-24
-       BR      ·SwapUint64(SB)
-
 TEXT ·CompareAndSwapInt32(SB),NOSPLIT,$0-17
        BR      ·CompareAndSwapUint32(SB)
 
@@ -66,9 +63,6 @@ TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0-17
 TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0-25
        BR      ·CompareAndSwapUint64(SB)
 
-TEXT ·CompareAndSwapPointer(SB),NOSPLIT,$0-25
-       BR      ·CompareAndSwapUint64(SB)
-
 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0-25
        BR      ·CompareAndSwapUint64(SB)
 
@@ -178,7 +172,4 @@ TEXT ·StoreUint64(SB),NOSPLIT,$0-16
        RETURN
 
 TEXT ·StoreUintptr(SB),NOSPLIT,$0-16
-       BR      ·StorePointer(SB)
-
-TEXT ·StorePointer(SB),NOSPLIT,$0-16
        BR      ·StoreUint64(SB)