github.com/huandu/go@v0.0.0-20151114150818-04e615e41150/misc/cgo/test/issue9400/asm_386.s (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build !gccgo 6 7 #include "textflag.h" 8 9 TEXT ·RewindAndSetgid(SB),NOSPLIT,$0-0 10 // Rewind stack pointer so anything that happens on the stack 11 // will clobber the test pattern created by the caller 12 ADDL $(1024 * 8), SP 13 14 // Ask signaller to setgid 15 MOVL $1, ·Baton(SB) 16 17 // Wait for setgid completion 18 loop: 19 PAUSE 20 MOVL ·Baton(SB), AX 21 CMPL AX, $0 22 JNE loop 23 24 // Restore stack 25 SUBL $(1024 * 8), SP 26 RET