Skip to content

GH-126910: reserve FP on AArch64 when generating JIT stencils#146520

Merged
Fidget-Spinner merged 4 commits intopython:mainfrom
diegorusso:reserve-fp-aarch64
Mar 27, 2026
Merged

GH-126910: reserve FP on AArch64 when generating JIT stencils#146520
Fidget-Spinner merged 4 commits intopython:mainfrom
diegorusso:reserve-fp-aarch64

Conversation

@diegorusso
Copy link
Copy Markdown
Contributor

@diegorusso diegorusso commented Mar 27, 2026

This is a follow up of #143548

This is needed for #146071

Copy link
Copy Markdown
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Two questions:

  • Has anyone actually tested that this works (and is necessary) for unwinding on macOS or Windows? If not, I'd be inclined to drop those from this PR.
  • why -fno-unwind-table everywhere now?

@diegorusso
Copy link
Copy Markdown
Contributor Author

  • why -fno-unwind-table everywhere now?

Fair point. Without it, stencils generation fails on Darwin because they introduce new relocation like ARM64_RELOC_SUBTRACTOR

On Darwin, -fno-asynchronous-unwind-tables is not enough by itself: clang can still emit .cfi_* in the assembly and produce __compact_unwind / __eh_frame in the object.

I thought to put it everywhere because the JIT stencils do not use object-file unwind metadata at all.

If you prefer I can put it on Darwin AArch64 only.

@diegorusso
Copy link
Copy Markdown
Contributor Author

diegorusso commented Mar 27, 2026

Cool! Two questions:

  • Has anyone actually tested that this works (and is necessary) for unwinding on macOS or Windows? If not, I'd be inclined to drop those from this PR.
  • why -fno-unwind-table everywhere now?

I've update the PR to do it just on Linux AArch64. macOS requires more investigation as the code generation is slightly different.
I've removed the -fno-unwind-table as well.

@Fidget-Spinner Fidget-Spinner merged commit 6763d26 into python:main Mar 27, 2026
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants