]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112535: Add comment for ppc32/64 registers (gh-112746)
authorDonghee Na <donghee.na@python.org>
Tue, 5 Dec 2023 10:44:19 +0000 (10:44 +0000)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 10:44:19 +0000 (19:44 +0900)
Include/object.h

index dfeb43bda7d841130ee894f8235d84a31a835697..85abd30b5ad7d6ac206ab6464d53114d4cd76e35 100644 (file)
@@ -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;