From 06544bbb6c203f7365f6fbe1c8c8f0ca4a218090 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Tue, 5 Dec 2023 10:44:19 +0000 Subject: [PATCH] gh-112535: Add comment for ppc32/64 registers (gh-112746) --- Include/object.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Include/object.h b/Include/object.h index dfeb43bda7d8411..85abd30b5ad7d6a 100644 --- a/Include/object.h +++ b/Include/object.h @@ -265,6 +265,7 @@ _Py_ThreadId(void) #if defined(__clang__) && _Py__has_builtin(__builtin_thread_pointer) tid = (uintptr_t)__builtin_thread_pointer(); #else + // r13 is reserved for use as system thread ID by the Power 64-bit ABI. register uintptr_t tp __asm__ ("r13"); __asm__("" : "=r" (tp)); tid = tp; @@ -273,6 +274,7 @@ _Py_ThreadId(void) #if defined(__clang__) && _Py__has_builtin(__builtin_thread_pointer) tid = (uintptr_t)__builtin_thread_pointer(); #else + // r2 is reserved for use as system thread ID by the Power 32-bit ABI. register uintptr_t tp __asm__ ("r2"); __asm__ ("" : "=r" (tp)); tid = tp;