mirror of https://github.com/python/cpython
gh-112535: Add comment for ppc32/64 registers (gh-112746)
This commit is contained in:
parent
2f20cafdbf
commit
5aa317e4ca
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue