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

Arm64 Backend Updates #286

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

YonahGoldberg
Copy link
Contributor

Lots of updates here.

  • Added an Arm64MacroAssembler to allow for operations that emit multiple assembly instructions. This is useful often in the backend.
  • The Arm64MacroAssembler also has operations that take addresses as operands and handles patching internally.
  • SsaArm64Gen is reworked so that it never calls iN.view on an integer type. I did this initially because Arm64 doesn't support large immediates in instructions, so it was easiest to just "view" the integer as a smaller type. This is dangerous and could cause unexpected bugs later on because views can truncate. SsaArm64Gen now makes the type of integers explicit in the MachIR by using Box. This allows for the MachIR to be closer to a mirror of the emitted assembly.
  • Added a second scratch register for the Arm64 backend. This is explained in a comment in Arm64RegSet.v3.
  • The only time the Arm64 backend calls view on an immediate is when patching addresses, which is a difficult corner case that I'll handle later.
  • Added pretty printing for the Arm64 MachIR, which I'll continue updating as I add more support. This includes a small change to other MachIRs, where immediates always show they're type when printing. Below is an example.
Screenshot 2024-10-02 at 12 48 32 PM

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.

1 participant