Skip to content

gh-112535: Add comment for ppc32/64 registers #112746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Include/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down