gh-158165: Fix _Py_get_machine_stack_pointer() compilation with MinGW - #158167
Conversation
|
See godbolt generated code: https://godbolt.org/z/Thbs6Ec3K |
markshannon
left a comment
There was a problem hiding this comment.
I don't think repeating the code in the
| result = (uintptr_t)_AddressOfReturnAddress(); | ||
| #elif defined(__aarch64__) | ||
| __asm__ ("mov %0, sp" : "=r" (result)); | ||
| #elif defined(__x86_64__) | ||
| __asm__("{movq %%rsp, %0" : "=r" (result)); | ||
| __asm__ ("{movq %%rsp, %0|mov %0, rsp}" : "=r" (result)); |
There was a problem hiding this comment.
Why is this necessary? Does MinGW use a different assembler?
There was a problem hiding this comment.
cpython/Include/cpython/object.h
Line 533 in 10b2d12
Just following _Py_ThreadId support for both assembler types.
There was a problem hiding this comment.
It's about defined(__x86_64__)
@markshannon |
|
@markshannon gentle ping? |
|
Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
Sorry, @corona10, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
Uh oh!
There was an error while loading. Please reload this page.