mirror of
https://github.com/golang/go
synced 2024-11-13 20:40:31 -07:00
c6ef69e7d7
Contributors to the loong64 port are: Weining Lu <luweining@loongson.cn> Lei Wang <wanglei@loongson.cn> Lingqin Gong <gonglingqin@loongson.cn> Xiaolin Zhao <zhaoxiaolin@loongson.cn> Meidan Li <limeidan@loongson.cn> Xiaojuan Zhai <zhaixiaojuan@loongson.cn> Qiyuan Pu <puqiyuan@loongson.cn> Guoqi Chen <chenguoqi@loongson.cn> This port has been updated to Go 1.15.6: https://github.com/loongson/go Updates #46229 Change-Id: I6760b4a7e51646773cd0f48baa1baba01b213b7d Reviewed-on: https://go-review.googlesource.com/c/go/+/342325 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
29 lines
633 B
ArmAsm
29 lines
633 B
ArmAsm
// Copyright 2022 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
#include "textflag.h"
|
|
|
|
TEXT ·RewindAndSetgid(SB),NOSPLIT|NOFRAME,$0-0
|
|
// Rewind stack pointer so anything that happens on the stack
|
|
// will clobber the test pattern created by the caller
|
|
ADDV $(1024*8), R3
|
|
|
|
// Ask signaller to setgid
|
|
MOVW $1, R12
|
|
DBAR
|
|
MOVW R12, ·Baton(SB)
|
|
DBAR
|
|
|
|
// Wait for setgid completion
|
|
loop:
|
|
DBAR
|
|
MOVW ·Baton(SB), R12
|
|
OR R13, R13, R13 // hint that we're in a spin loop
|
|
BNE R12, loop
|
|
DBAR
|
|
|
|
// Restore stack
|
|
ADDV $(-1024*8), R3
|
|
RET
|