Skip to content
Merged
Changes from 1 commit
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
Next Next commit
gh-112535: Add comment for ppc32/64 registers
  • Loading branch information
corona10 committed Dec 5, 2023
commit 2f5f850331b07890af9fd3a4ba135018e748e6e4
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 64-bit ABI.
Comment thread
corona10 marked this conversation as resolved.
Outdated
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 32-bit ABI.
Comment thread
corona10 marked this conversation as resolved.
Outdated
register uintptr_t tp __asm__ ("r2");
__asm__ ("" : "=r" (tp));
tid = tp;
Expand Down