annotate libgo/misc/cgo/test/issue9400/asm_amd64x.s @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
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