diff options
| author | Russ Cox <rsc@golang.org> | 2014-09-14 13:57:28 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-09-14 13:57:28 -0400 |
| commit | 40dd6bf38e06bf26aa1c15438cdf0965cf778050 (patch) | |
| tree | e47286b9709f3cd0c789512ecd4683a499e73df8 /src/runtime | |
| parent | e3d2e5550e525308e9e9323fbaf05c4ea6588215 (diff) | |
| download | go-40dd6bf38e06bf26aa1c15438cdf0965cf778050.tar.xz | |
runtime: mark asmcgocall<>(SB) as having no arguments
It doesn't.
Fixes 386 build.
While we're here, mark runtime.asmcgocall as GO_ARGS,
so that it will work with stack copying. I don't think anything
that uses it can lead to a stack copy, but better safe than sorry.
Certainly the runtime.asmcgocall_errno variant needs
(and already has) GO_ARGS.
TBR=iant
CC=golang-codereviews
https://golang.org/cl/138400043
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/asm_386.s | 3 | ||||
| -rw-r--r-- | src/runtime/asm_amd64.s | 1 | ||||
| -rw-r--r-- | src/runtime/asm_arm.s | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime/asm_386.s b/src/runtime/asm_386.s index c9fd75bfc4..21065b6d6f 100644 --- a/src/runtime/asm_386.s +++ b/src/runtime/asm_386.s @@ -647,6 +647,7 @@ TEXT gosave<>(SB),NOSPLIT,$0 // aligned appropriately for the gcc ABI. // See cgocall.c for more details. TEXT runtime·asmcgocall(SB),NOSPLIT,$0-8 + GO_ARGS MOVL fn+0(FP), AX MOVL arg+4(FP), BX CALL asmcgocall<>(SB) @@ -660,7 +661,7 @@ TEXT runtime·asmcgocall_errno(SB),NOSPLIT,$0-12 MOVL AX, ret+8(FP) RET -TEXT asmcgocall<>(SB),NOSPLIT,$0-12 +TEXT asmcgocall<>(SB),NOSPLIT,$0-0 // fn in AX, arg in BX MOVL SP, DX diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s index d5e2f56ef0..da29f61ed8 100644 --- a/src/runtime/asm_amd64.s +++ b/src/runtime/asm_amd64.s @@ -624,6 +624,7 @@ TEXT gosave<>(SB),NOSPLIT,$0 // aligned appropriately for the gcc ABI. // See cgocall.c for more details. TEXT runtime·asmcgocall(SB),NOSPLIT,$0-16 + GO_ARGS MOVQ fn+0(FP), AX MOVQ arg+8(FP), BX CALL asmcgocall<>(SB) diff --git a/src/runtime/asm_arm.s b/src/runtime/asm_arm.s index 368b4ad8e8..3e78d91143 100644 --- a/src/runtime/asm_arm.s +++ b/src/runtime/asm_arm.s @@ -481,6 +481,7 @@ TEXT gosave<>(SB),NOSPLIT,$0 // aligned appropriately for the gcc ABI. // See cgocall.c for more details. TEXT runtime·asmcgocall(SB),NOSPLIT,$0-8 + GO_ARGS MOVW fn+0(FP), R1 MOVW arg+4(FP), R0 BL asmcgocall<>(SB) |
