Skip to content
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

JIT: remove jumps at the end of every micro op on aarch64 #130887

Open
diegorusso opened this issue Mar 5, 2025 · 0 comments
Open

JIT: remove jumps at the end of every micro op on aarch64 #130887

diegorusso opened this issue Mar 5, 2025 · 0 comments
Assignees
Labels
3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage topic-JIT triaged The issue has been accepted as valid by a triager.

Comments

@diegorusso
Copy link
Contributor

diegorusso commented Mar 5, 2025

Feature or enhancement

Bug description:

AArch64 JIT stencils contain a jump at the end of every micro op:

...
    // d4: a8c17bfd      ldp     x29, x30, [sp], #0x10
    // d8: 14000000      b       0xd8 <_JIT_ENTRY+0xd8>
    // 00000000000000d8:  R_AARCH64_JUMP26     _JIT_CONTINUE

These jumps need to be removed and replaced with no-ops to keep the alignment of 8 bytes.
Also the current padding mechanism needs to be removed as well.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

@diegorusso diegorusso added topic-JIT type-feature A feature request or enhancement labels Mar 5, 2025
@diegorusso diegorusso self-assigned this Mar 5, 2025
@brandtbucher brandtbucher added performance Performance or resource usage interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.14 new features, bugs and security fixes and removed type-feature A feature request or enhancement labels Mar 5, 2025
@picnixz picnixz added the triaged The issue has been accepted as valid by a triager. label Mar 7, 2025
diegorusso added a commit to diegorusso/cpython that referenced this issue Mar 10, 2025
In order to keep the alignment of the code body, the removed
jump and the 0 padding at the end of AArch64 JIT stencils
have been replaced with nop instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage topic-JIT triaged The issue has been accepted as valid by a triager.
Projects
None yet
Development

No branches or pull requests

3 participants