From 40fce515f98c0c16c361b1c85a4e638fd5b63491 Mon Sep 17 00:00:00 2001 From: Lynn Boger Date: Mon, 27 Sep 2021 08:10:20 -0500 Subject: [PATCH] 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 Run-TryBot: Lynn Boger TryBot-Result: Go Bot Reviewed-by: Cherry Mui --- src/runtime/race_ppc64le.s | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/runtime/race_ppc64le.s b/src/runtime/race_ppc64le.s index 963e57099c..625c81a255 100644 --- a/src/runtime/race_ppc64le.s +++ b/src/runtime/race_ppc64le.s @@ -43,8 +43,12 @@ // func runtime·RaceRead(addr uintptr) // Called from instrumented Go code -TEXT runtime·raceread(SB), NOSPLIT, $0-8 +TEXT runtime·raceread(SB), NOSPLIT, $0-8 +#ifndef GOEXPERIMENT_regabiargs MOVD addr+0(FP), R4 +#else + MOVD R3, R4 +#endif MOVD LR, R5 // caller of this? // void __tsan_read(ThreadState *thr, void *addr, void *pc); MOVD $__tsan_read(SB), R8 @@ -64,8 +68,12 @@ TEXT runtime·racereadpc(SB), NOSPLIT, $0-24 // func runtime·RaceWrite(addr uintptr) // Called from instrumented Go code -TEXT runtime·racewrite(SB), NOSPLIT, $0-8 +TEXT runtime·racewrite(SB), NOSPLIT, $0-8 +#ifndef GOEXPERIMENT_regabiargs MOVD addr+0(FP), R4 +#else + MOVD R3, R4 +#endif MOVD LR, R5 // caller has set LR via BL inst // void __tsan_write(ThreadState *thr, void *addr, void *pc); MOVD $__tsan_write(SB), R8 @@ -85,9 +93,14 @@ TEXT runtime·racewritepc(SB), NOSPLIT, $0-24 // func runtime·RaceReadRange(addr, size uintptr) // Called from instrumented Go code. -TEXT runtime·racereadrange(SB), NOSPLIT, $0-16 +TEXT runtime·racereadrange(SB), NOSPLIT, $0-16 +#ifndef GOEXPERIMENT_regabiargs MOVD addr+0(FP), R4 MOVD size+8(FP), R5 +#else + MOVD R4, R5 + MOVD R3, R4 +#endif MOVD LR, R6 // void __tsan_read_range(ThreadState *thr, void *addr, uintptr size, void *pc); MOVD $__tsan_read_range(SB), R8 @@ -108,9 +121,14 @@ TEXT runtime·RaceReadRange(SB), NOSPLIT, $0-16 // func runtime·RaceWriteRange(addr, size uintptr) // Called from instrumented Go code. -TEXT runtime·racewriterange(SB), NOSPLIT, $0-16 +TEXT runtime·racewriterange(SB), NOSPLIT, $0-16 +#ifndef GOEXPERIMENT_regabiargs MOVD addr+0(FP), R4 MOVD size+8(FP), R5 +#else + MOVD R4, R5 + MOVD R3, R4 +#endif MOVD LR, R6 // void __tsan_write_range(ThreadState *thr, void *addr, uintptr size, void *pc); MOVD $__tsan_write_range(SB), R8