-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-112535: Update _Py_ThreadId() to support RISC-V #113084
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
Conversation
|
GCC ./configure --disable-gil --with-pydebugTest: Output: The failed test_cmd_line test was already an existing issue for RISC-V. |
|
CLANG Test: Output: The failed test_cmd_line test and test.test_gdb.test_backtrace, test.test_gdb.test_pretty_print were already existing issues for RISC-V. |
| tid = (uintptr_t)__builtin_thread_pointer(); | ||
| #else | ||
| // tp is Thread Pointer provided by the RISC-V ABI. | ||
| __asm__ ("mv %0, tp" : "=r" (tid)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gcc.godbolt.org/z/TYe716Wa7
I cross-checked the assembly code from Godbolt, too.
(Both 32bit and 64bit)
corona10
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but waiting @colesbury too.
…3084) Update _Py_ThreadId() to support RISC-V
…3084) Update _Py_ThreadId() to support RISC-V
…3084) Update _Py_ThreadId() to support RISC-V
_Py_ThreadId()work on PowerPC, IBM Z, etc. #112535