diff options
| author | Cherry Zhang <cherryyz@google.com> | 2020-10-30 17:16:51 -0400 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2020-10-30 22:36:07 +0000 |
| commit | fd56942fe3725feaa53bed67daf7412742e4f2ab (patch) | |
| tree | 7a98ad671d7b8860179b0fe31c280df0e6cff576 /src | |
| parent | 64a9a75ce9a353ef3d488b8e3ca977bf6df204f8 (diff) | |
| download | go-fd56942fe3725feaa53bed67daf7412742e4f2ab.tar.xz | |
runtime: add a comment about thread pointer alignment on darwin/arm64
Address a review comment in CL 266373.
Change-Id: Ic21bd5c4f87fd0c7dc594155a10fe23602698187
Reviewed-on: https://go-review.googlesource.com/c/go/+/266777
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/race_arm64.s | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/race_arm64.s b/src/runtime/race_arm64.s index 59373a9f3f..5b1a1cb89a 100644 --- a/src/runtime/race_arm64.s +++ b/src/runtime/race_arm64.s @@ -25,12 +25,15 @@ // The race ctx, ThreadState *thr below, is passed in R0 and loaded in racecalladdr. +// Darwin may return unaligned thread pointer. Align it. (See tls_arm64.s) +// No-op on other OSes. #ifdef TLS_darwin #define TP_ALIGN AND $~7, R0 #else #define TP_ALIGN #endif +// Load g from TLS. (See tls_arm64.s) #define load_g \ MRS_TPIDR_R0 \ TP_ALIGN \ |
