github.com/zach-klippenstein/go@v0.0.0-20150108044943-fcfbeb3adf58/misc/cgo/test/issue9400/asm_386.s (about) 1 #include "textflag.h" 2 3 TEXT ·RewindAndSetgid(SB),NOSPLIT,$0-0 4 // Rewind stack pointer so anything that happens on the stack 5 // will clobber the test pattern created by the caller 6 ADDL $(1024 * 8), SP 7 8 // Ask signaller to setgid 9 MOVL $1, ·Baton(SB) 10 11 // Wait for setgid completion 12 loop: 13 PAUSE 14 MOVL ·Baton(SB), AX 15 CMPL AX, $0 16 JNE loop 17 18 // Restore stack 19 SUBL $(1024 * 8), SP 20 RET