annotate libgo/misc/cgo/test/issue9400/asm_amd64x.s @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // Copyright 2014 The Go Authors. All rights reserved.
kono
parents:
diff changeset
2 // Use of this source code is governed by a BSD-style
kono
parents:
diff changeset
3 // license that can be found in the LICENSE file.
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 // +build amd64 amd64p32
kono
parents:
diff changeset
6 // +build !gccgo
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 #include "textflag.h"
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 TEXT ·RewindAndSetgid(SB),NOSPLIT,$0-0
kono
parents:
diff changeset
11 // Rewind stack pointer so anything that happens on the stack
kono
parents:
diff changeset
12 // will clobber the test pattern created by the caller
kono
parents:
diff changeset
13 ADDQ $(1024 * 8), SP
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 // Ask signaller to setgid
kono
parents:
diff changeset
16 MOVL $1, ·Baton(SB)
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 // Wait for setgid completion
kono
parents:
diff changeset
19 loop:
kono
parents:
diff changeset
20 PAUSE
kono
parents:
diff changeset
21 MOVL ·Baton(SB), AX
kono
parents:
diff changeset
22 CMPL AX, $0
kono
parents:
diff changeset
23 JNE loop
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 // Restore stack
kono
parents:
diff changeset
26 SUBQ $(1024 * 8), SP
kono
parents:
diff changeset
27 RET