]> Cypherpunks repositories - gostls13.git/commit
runtime: do not use memmove in the Plan 9 signal handler
authorAnthony Martin <ality@pbrane.org>
Mon, 9 Dec 2013 23:41:48 +0000 (18:41 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 9 Dec 2013 23:41:48 +0000 (18:41 -0500)
commit274a8e3f56358dd8ab93aad1bbd750bcb2750296
treeb9fa89e34ed04e8d0f8b44b1f2aece38a0b99c77
parentdba4d11e0809547296e051ce58eb04ab10e549da
runtime: do not use memmove in the Plan 9 signal handler

Fixes a regression introduced in revision 4cb93e2900d0.

That revision changed runtime·memmove to use SSE MOVOU
instructions for sizes between 17 and 256 bytes. We were
using memmove to save a copy of the note string during
the note handler. The Plan 9 kernel does not allow the
use of floating point in note handlers (which includes
MOVOU since it touches the XMM registers).

Arguably, runtime·memmove should not be using MOVOU when
GO386=387 but that wouldn't help us on amd64. It's very
important that we guard against any future changes so we
use a simple copy loop instead.

This change is extracted from CL 9796043 (since that CL
is still being ironed out).

R=rsc
CC=golang-dev
https://golang.org/cl/34640045
src/pkg/runtime/os_plan9_386.c
src/pkg/runtime/os_plan9_amd64.c