mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
The libc memmove and memclr don't reliably operate on full memory words. We already avoided them on PPC64, but the same problem can occur even on x86, where some processors use "rep movsb" and "rep stosb". Always use C code that stores full memory words. While we're here, clean up the C code. We don't need special handling if the memmove/memclr pointers are not pointer-aligned. Unfortunately, this will likely be slower. Perhaps some day we can have our own assembly code that operates a word at a time, or we can use different operations when we know there are no pointers. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/685178