runtime: use correct memory barrier in exitThread function on loong64

In the runtime.exitThread function, a storeRelease barrier
is required instead of a full barrier.

Change-Id: I2815ddb03e4984c891d71811ccf650a82325e10d
Reviewed-on: https://go-review.googlesource.com/c/go/+/631915
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
Guoqi Chen 2024-11-26 17:10:32 +08:00 committed by abner chenc
parent c594762ad5
commit 11c847e536
1 changed files with 2 additions and 4 deletions

View File

@ -57,10 +57,8 @@ TEXT runtime·exit(SB),NOSPLIT|NOFRAME,$0-4
TEXT runtime·exitThread(SB),NOSPLIT|NOFRAME,$0-8
MOVV wait+0(FP), R19
// We're done using the stack.
MOVW $0, R11
DBAR
MOVW R11, (R19)
DBAR
DBAR $0x12 // StoreRelease barrier
MOVW R0, (R19)
MOVW $0, R4 // exit code
MOVV $SYS_exit, R11
SYSCALL