runtime: block signals during thread creation on openbsd

Block signals during thread creation, otherwise the new thread can
receive a signal prior to initialisation completing.

Fixes issue 3102.

R=golang-dev, rsc, devon.odell, minux.ma
CC=golang-dev
http://codereview.appspot.com/5757064
6a, 6l: add PREFETCH instructions

R=ken2
CC=golang-dev
http://codereview.appspot.com/5989073
8a, 8l: add PREFETCH instructions

R=ken2
CC=golang-dev
http://codereview.appspot.com/5992082
cmd/api: allow addition of API

R=bradfitz, rsc
CC=golang-dev
http://codereview.appspot.com/5991081
syscall: support Getpid() on Windows
        Fixes issue 3379.

R=golang-dev, alex.brainman, rsc, bradfitz
CC=golang-dev
http://codereview.appspot.com/5909043
cmd/8c: fix store to complex uint64 ptr

Assignment of a computed uint64 value to an
address derived with a function call was executing
the call after computing the value, which trashed
the value (held in registers).

long long *f(void) { return 0; }
void g(int x, int y) {
        *f() = (long long)x | (long long)y<<32;
}

Before:

(x.c:3)	TEXT	g+0(SB),(gok(71))
...
(x.c:4)	ORL	AX,DX
(x.c:4)	ORL	CX,BX
(x.c:4)	CALL	,f+0(SB)
(x.c:4)	MOVL	DX,(AX)
(x.c:4)	MOVL	BX,4(AX)

After:
(x.c:3)	TEXT	g+0(SB),(gok(71))
(x.c:4)	CALL	,f+0(SB)
...
(x.c:4)	ORL	CX,BX
(x.c:4)	ORL	DX,BP
(x.c:4)	MOVL	BX,(AX)
(x.c:4)	MOVL	BP,4(AX)

Fixes issue 3501.

R=ken2
CC=golang-dev
http://codereview.appspot.com/5998043
cmd/6c: fix probable code gen bug

This is a pointer being copied; MOVL can't possibly be right.

R=ken2
CC=golang-dev
http://codereview.appspot.com/5999043
6c, 6g, 6l: add MOVQL to make truncation explicit

Without an explicit signal for a truncation, copy propagation
will sometimes propagate a 32-bit truncation and end up
overwriting uses of the original 64-bit value.

The case that arose in practice is in C but I believe
that the same could plausibly happen in Go.
The main reason we didn't run into the same in Go
is that I (perhaps incorrectly?) drop MOVL AX, AX
during gins, so the truncation was never generated, so
it didn't confuse the optimizer.

Fixes issue 1315.
Fixes issue 3488.

R=ken2
CC=golang-dev
http://codereview.appspot.com/6002043
runtime: unregister the SIGILL handler after ARM EABI test
Part of issue 3381

R=rsc, minux.ma, dave
CC=golang-dev
http://codereview.appspot.com/5969064

Committer: Russ Cox <rsc@golang.org>
A+C: Akshat Kumar (individual CLA)

R=golang-dev, bradfitz
CC=golang-dev
http://codereview.appspot.com/6004043
runtime: fix floating point exception on Plan 9

Change 5660047 moved an FLDCW instruction
that disables invalid operand traps into
runtime·asminit, which is called from
runtime·mstart. Thus, runtime·check is being
called prior to setting the appropriate control bits,
which on any QNaN comparison will cause Plan 9
to take an invalid operand trap. This change loads
the control bits (for Plan 9) prior to runtime·check.
Ideally, this should be done before the QNaN checks
on any system, but possibly other kernels simply
don't ever trap on invalid operands.

R=golang-dev, rminnich
CC=golang-dev, john, rsc
http://codereview.appspot.com/5939045

Committer: Russ Cox <rsc@golang.org>
hash: more efficient memory allocation

Feed append the complete content at once.

BenchmarkAdler32KB       1000000              2534 ns/op         404.05 MB/s
BenchmarkCrc32KB          500000              4757 ns/op         215.26 MB/s
BenchmarkCrc64KB          500000              4769 ns/op         214.70 MB/s
BenchmarkFnv32KB         1000000              2417 ns/op         423.64 MB/s
BenchmarkFnv32aKB        1000000              2408 ns/op         425.23 MB/s
BenchmarkFnv64KB          500000              4262 ns/op         240.21 MB/s
BenchmarkFnv64aKB         500000              4234 ns/op         241.83 MB/s

R=iant, rsc, r, minux.ma
CC=golang-dev
http://codereview.appspot.com/5937053

Committer: Russ Cox <rsc@golang.org>
5a, 5l: add PLD (preload data) instruction
        Supported in ARMv5TE and above, excluding ARMv5TExP.
        For CL 5990066.

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/5999044
5l, runtime: remove softfloat emulation code when not used
This leads to ~30kB improvement on code size for ARM machines with VFP/NEON.
Example: go test -c math
       GOARM=5  GOARM=6
  Old: 1884200  1839144
  New: 1884165  1805245
  -:        35    33899

R=rsc, bradfitz, dave, kai.backman
CC=golang-dev
http://codereview.appspot.com/5975060