diff options
author | Lynn Boger <laboger@linux.vnet.ibm.com> | 2021-02-22 09:12:01 -0600 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-02-25 17:01:23 -0800 |
commit | 2fbed0dc6c4dffcfd586a990fc3d2aeb7e00d521 (patch) | |
tree | 4c32e8e2b504ca2528abaf6d1800db11ed359027 /libgo/go | |
parent | a505fad4dd4d93b6d642995d7df320aa40949568 (diff) | |
download | gcc-2fbed0dc6c4dffcfd586a990fc3d2aeb7e00d521.zip gcc-2fbed0dc6c4dffcfd586a990fc3d2aeb7e00d521.tar.gz gcc-2fbed0dc6c4dffcfd586a990fc3d2aeb7e00d521.tar.bz2 |
libgo: ensure memmove, memset 8 byte atomicity on ppc64x
Go requires that pointer moves are done 8 bytes at a time,
but gccgo uses libc's memmove and memset which does not require
that, and there are some cases where an 8 byte move might be
done as 4+4.
To enforce 8 byte moves for memmove and memset, this adds a
C implementation in libgo/runtime for memmove and memset to be
used on ppc64le and ppc64. Asm implementations were considered
but discarded to avoid different implementations for different
target ISAs.
Fixes golang/go#41428
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/294931
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/runtime/stubs.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libgo/go/runtime/stubs.go b/libgo/go/runtime/stubs.go index 6d20c38..dea7234 100644 --- a/libgo/go/runtime/stubs.go +++ b/libgo/go/runtime/stubs.go @@ -106,9 +106,7 @@ func reflect_memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr) { memclrNoHeapPointers(ptr, n) } -// memmove copies n bytes from "from" to "to". //go:noescape -//extern __builtin_memmove func memmove(to, from unsafe.Pointer, n uintptr) //go:linkname reflect_memmove reflect.memmove |