Skip to content

Commit

Permalink
pythongh-112535: Add comment for ppc32/64 registers (pythongh-112746)
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 authored and aisk committed Feb 11, 2024
1 parent 58b5b6c commit 06544bb
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit 06544bb

Please sign in to comment.