1
0
mirror of https://github.com/golang/go synced 2024-11-17 15:34:42 -07:00

runtime: mark race functions as ABIInternal

This adds ABIInternal to the race function declarations.

Change-Id: I99f8a310972ff09b4d56eedbcc6e9609bab0f224
Reviewed-on: https://go-review.googlesource.com/c/go/+/352369
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Lynn Boger 2021-09-27 08:10:20 -05:00
parent ecac3512e5
commit 40fce515f9

View File

@ -43,8 +43,12 @@
// func runtime·RaceRead(addr uintptr) // func runtime·RaceRead(addr uintptr)
// Called from instrumented Go code // Called from instrumented Go code
TEXT runtime·raceread(SB), NOSPLIT, $0-8 TEXT runtime·raceread<ABIInternal>(SB), NOSPLIT, $0-8
#ifndef GOEXPERIMENT_regabiargs
MOVD addr+0(FP), R4 MOVD addr+0(FP), R4
#else
MOVD R3, R4
#endif
MOVD LR, R5 // caller of this? MOVD LR, R5 // caller of this?
// void __tsan_read(ThreadState *thr, void *addr, void *pc); // void __tsan_read(ThreadState *thr, void *addr, void *pc);
MOVD $__tsan_read(SB), R8 MOVD $__tsan_read(SB), R8
@ -64,8 +68,12 @@ TEXT runtime·racereadpc(SB), NOSPLIT, $0-24
// func runtime·RaceWrite(addr uintptr) // func runtime·RaceWrite(addr uintptr)
// Called from instrumented Go code // Called from instrumented Go code
TEXT runtime·racewrite(SB), NOSPLIT, $0-8 TEXT runtime·racewrite<ABIInternal>(SB), NOSPLIT, $0-8
#ifndef GOEXPERIMENT_regabiargs
MOVD addr+0(FP), R4 MOVD addr+0(FP), R4
#else
MOVD R3, R4
#endif
MOVD LR, R5 // caller has set LR via BL inst MOVD LR, R5 // caller has set LR via BL inst
// void __tsan_write(ThreadState *thr, void *addr, void *pc); // void __tsan_write(ThreadState *thr, void *addr, void *pc);
MOVD $__tsan_write(SB), R8 MOVD $__tsan_write(SB), R8
@ -85,9 +93,14 @@ TEXT runtime·racewritepc(SB), NOSPLIT, $0-24
// func runtime·RaceReadRange(addr, size uintptr) // func runtime·RaceReadRange(addr, size uintptr)
// Called from instrumented Go code. // Called from instrumented Go code.
TEXT runtime·racereadrange(SB), NOSPLIT, $0-16 TEXT runtime·racereadrange<ABIInternal>(SB), NOSPLIT, $0-16
#ifndef GOEXPERIMENT_regabiargs
MOVD addr+0(FP), R4 MOVD addr+0(FP), R4
MOVD size+8(FP), R5 MOVD size+8(FP), R5
#else
MOVD R4, R5
MOVD R3, R4
#endif
MOVD LR, R6 MOVD LR, R6
// void __tsan_read_range(ThreadState *thr, void *addr, uintptr size, void *pc); // void __tsan_read_range(ThreadState *thr, void *addr, uintptr size, void *pc);
MOVD $__tsan_read_range(SB), R8 MOVD $__tsan_read_range(SB), R8
@ -108,9 +121,14 @@ TEXT runtime·RaceReadRange(SB), NOSPLIT, $0-16
// func runtime·RaceWriteRange(addr, size uintptr) // func runtime·RaceWriteRange(addr, size uintptr)
// Called from instrumented Go code. // Called from instrumented Go code.
TEXT runtime·racewriterange(SB), NOSPLIT, $0-16 TEXT runtime·racewriterange<ABIInternal>(SB), NOSPLIT, $0-16
#ifndef GOEXPERIMENT_regabiargs
MOVD addr+0(FP), R4 MOVD addr+0(FP), R4
MOVD size+8(FP), R5 MOVD size+8(FP), R5
#else
MOVD R4, R5
MOVD R3, R4
#endif
MOVD LR, R6 MOVD LR, R6
// void __tsan_write_range(ThreadState *thr, void *addr, uintptr size, void *pc); // void __tsan_write_range(ThreadState *thr, void *addr, uintptr size, void *pc);
MOVD $__tsan_write_range(SB), R8 MOVD $__tsan_write_range(SB), R8