]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: mark asmcgocall<>(SB) as having no arguments
authorRuss Cox <rsc@golang.org>
Sun, 14 Sep 2014 17:57:28 +0000 (13:57 -0400)
committerRuss Cox <rsc@golang.org>
Sun, 14 Sep 2014 17:57:28 +0000 (13:57 -0400)
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

src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_arm.s

index c9fd75bfc4c881fba353fe9f819abe75d263670a..21065b6d6ff6e6a23b68e585bdfb4f5857063883 100644 (file)
@@ -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
 
index d5e2f56ef08b12a9af4fdd60b77532548c5e427c..da29f61ed84a194b519c251e2ac9f594c63e8d76 100644 (file)
@@ -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)
index 368b4ad8e87c84c9172b0b87d1e3ee515624fcc7..3e78d91143a69a9d9e8a20a58001aa4853436789 100644 (file)
@@ -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)