-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
gh-119726: emit AArch64 trampolines in the data section #121280
gh-119726: emit AArch64 trampolines in the data section #121280
Conversation
Emit AArch64 trampolines in the data section (instead of the code) of the stencil. In many cases this allows the branch to the next micro-op at the end of the stencil to be replaced with a fall-through NOP.
@brandtbucher I have provided a news entry but I feel we can skip it for the PR. Let me know what you think. |
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.
Looks great! Just one minor comment:
Misc/NEWS.d/next/Core and Builtins/2024-06-28-18-34-49.gh-issue-119726.Fjv_Ab.rst
Outdated
Show resolved
Hide resolved
where = slice(hole.offset, hole.offset + 4) | ||
instruction = int.from_bytes(self.body[where], sys.byteorder) | ||
instruction &= 0xFC000000 | ||
instruction |= ((base - hole.offset) >> 2) & 0x03FFFFFF | ||
self.body[where] = instruction.to_bytes(4, sys.byteorder) | ||
new_hole = hole.replace(addend=base, symbol=None, value=HoleValue.DATA) |
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.
This is so much nicer!
…e-119726.Fjv_Ab.rst Co-authored-by: Brandt Bucher <[email protected]>
Emit AArch64 trampolines in the data section (instead of the code) of the stencil. In many cases this allows the branch to the next micro-op at the end of the stencil to be replaced with a fall-through NOP.