diff options
author | Donghee Na <donghee.na@python.org> | 2023-12-05 10:44:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 10:44:19 (GMT) |
commit | 5aa317e4ca619c3735e1d67b507f01a8e49a4c49 (patch) | |
tree | cd97ba826de6c636e7e727ebd83e22bf6053b042 | |
parent | 2f20cafdbfc39925f9374f36f9d53bac365ed32a (diff) | |
download | cpython-5aa317e4ca619c3735e1d67b507f01a8e49a4c49.zip cpython-5aa317e4ca619c3735e1d67b507f01a8e49a4c49.tar.gz cpython-5aa317e4ca619c3735e1d67b507f01a8e49a4c49.tar.bz2 |
gh-112535: Add comment for ppc32/64 registers (gh-112746)
-rw-r--r-- | Include/object.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h index dfeb43b..85abd30 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; |