We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01b006f commit 92fb0a0Copy full SHA for 92fb0a0
misc/cgo/test/issue9400/asm_mipsx.s
@@ -0,0 +1,31 @@
1
+// Copyright 2016 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 mips mipsle
6
+// +build !gccgo
7
8
+#include "textflag.h"
9
10
+TEXT ·RewindAndSetgid(SB),NOSPLIT,$-4-0
11
+ // Rewind stack pointer so anything that happens on the stack
12
+ // will clobber the test pattern created by the caller
13
+ ADDU $(1024*8), R29
14
15
+ // Ask signaller to setgid
16
+ MOVW $1, R1
17
+ SYNC
18
+ MOVW R1, ·Baton(SB)
19
20
21
+ // Wait for setgid completion
22
+loop:
23
24
+ MOVW ·Baton(SB), R1
25
+ OR R2, R2, R2 // hint that we're in a spin loop
26
+ BNE R1, loop
27
28
29
+ // Restore stack
30
+ ADDU $(-1024*8), R29
31
+ RET
0 commit comments