annotate libgo/misc/cgo/test/issue9400/asm_mips64x.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 2016 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 mips64 mips64le
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 #define SYNC WORD $0xf
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 TEXT ·RewindAndSetgid(SB),NOSPLIT|NOFRAME,$0-0
kono
parents:
diff changeset
13 // Rewind stack pointer so anything that happens on the stack
kono
parents:
diff changeset
14 // will clobber the test pattern created by the caller
kono
parents:
diff changeset
15 ADDV $(1024*8), R29
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 // Ask signaller to setgid
kono
parents:
diff changeset
18 MOVW $1, R1
kono
parents:
diff changeset
19 SYNC
kono
parents:
diff changeset
20 MOVW R1, ·Baton(SB)
kono
parents:
diff changeset
21 SYNC
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 // Wait for setgid completion
kono
parents:
diff changeset
24 loop:
kono
parents:
diff changeset
25 SYNC
kono
parents:
diff changeset
26 MOVW ·Baton(SB), R1
kono
parents:
diff changeset
27 OR R2, R2, R2 // hint that we're in a spin loop
kono
parents:
diff changeset
28 BNE R1, loop
kono
parents:
diff changeset
29 SYNC
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 // Restore stack
kono
parents:
diff changeset
32 ADDV $(-1024*8), R29
kono
parents:
diff changeset
33 RET