diff options
| author | Russ Cox <rsc@golang.org> | 2014-08-27 22:50:08 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-08-27 22:50:08 -0400 |
| commit | f9b9ecc5ee1b3ea8212ee801e719fb748dedc20e (patch) | |
| tree | 4ea3af1cd70706e78a75b8c74b1ea499385ef938 /src/pkg/runtime/stack.c | |
| parent | 433d64373241634af93ca35f229c1cb26caf9180 (diff) | |
| download | go-f9b9ecc5ee1b3ea8212ee801e719fb748dedc20e.tar.xz | |
runtime: fix nacl build
The NaCl "system calls" were assumed to have a compatible
return convention with the C compiler, and we were using
tail jumps to those functions. Don't do that anymore.
Correct mistake introduced in newstackcall duringconversion
from (SP) to (FP) notation. (Actually this fix, in asm_amd64p32.s,
slipped into the C compiler change, but update the name to
match what go vet wants.)
Correct computation of caller stack pointer in morestack:
on amd64p32, the saved PC is the size of a uintreg, not uintptr.
This may not matter, since it's been like this for a while,
but uintreg is the correct one. (And on non-NaCl they are the same.)
This will allow the NaCl build to get much farther.
It will probably still not work completely.
There's a bug in 6l that needs fixing too.
TBR=minux
CC=golang-codereviews
https://golang.org/cl/134990043
Diffstat (limited to 'src/pkg/runtime/stack.c')
| -rw-r--r-- | src/pkg/runtime/stack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c index 78d1e149e7..0ce869f442 100644 --- a/src/pkg/runtime/stack.c +++ b/src/pkg/runtime/stack.c @@ -899,7 +899,7 @@ runtime·newstack(void) sp = gp->sched.sp; if(thechar == '6' || thechar == '8') { // The call to morestack cost a word. - sp -= sizeof(uintptr); + sp -= sizeof(uintreg); } if(StackDebug >= 1 || sp < gp->stackguard - StackGuard) { runtime·printf("runtime: newstack framesize=%p argsize=%p sp=%p stack=[%p, %p]\n" |
