whatcanGOwrong
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func asmFunc(*int) int
|
||||
|
||||
func main() {
|
||||
fmt.Printf("%d\n", asmFunc(nil))
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·asmFunc(SB),0,$0-16
|
||||
MOVL arg+0(FP), AX
|
||||
MOVL (AX), AX
|
||||
MOVL AX, ret+4(FP)
|
||||
RET
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·asmFunc(SB),0,$0-16
|
||||
MOVQ arg+0(FP), AX
|
||||
MOVQ (AX), AX
|
||||
MOVQ AX, ret+8(FP)
|
||||
RET
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·asmFunc(SB),0,$0-16
|
||||
MOVD arg+0(FP), R5
|
||||
MOVD (R5), R5
|
||||
MOVD R5, ret+8(FP)
|
||||
RET
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·asmFunc(SB),0,$0-16
|
||||
MOVD arg+0(FP), R5
|
||||
MOVD (R5), R5
|
||||
MOVD R5, ret+8(FP)
|
||||
RET
|
||||
Reference in New Issue
Block a user