mirror of https://github.com/golang/go.git
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:
parent
c594762ad5
commit
11c847e536
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue