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

A lot of fixes coming from our pairing session #329

Merged
merged 7 commits into from Jul 19, 2022

Conversation

kddnewton
Copy link

@kddnewton kddnewton commented Jul 19, 2022

  • Previously we weren't properly handling if you were MOV-ing to/from SP. Now we detect that and switch to an ADD because otherwise MOV interprets it as the zero register.
  • Now we're using that to implement Op::FrameSetup and Op::FrameTeardown instead of the more esoteric adds.
  • The load and store module have been merged because their encoding was very similar.
  • I've added support for encoding both LDR and STR with pre and post indexing.
  • With these new encodings we can simplify our pushes and pops.

Our push goes from

SUB SP, SP, 16
STUR XT, [SP, 0]

to

STR XT, [SP, -16]!

and our pop goes from

LDUR XT, [SP, 0]
ADD SP, SP, 16

to

LDR XT, [SP], 16

@maximecb maximecb merged commit 8eb7fab into Shopify:yjit_backend_ir Jul 19, 2022
maximecb pushed a commit that referenced this pull request Jul 20, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
maximecb pushed a commit that referenced this pull request Jul 25, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
noahgibbs pushed a commit that referenced this pull request Aug 23, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
noahgibbs pushed a commit that referenced this pull request Aug 24, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP

PR: #329
noahgibbs pushed a commit that referenced this pull request Aug 25, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP

PR: #329
k0kubun pushed a commit that referenced this pull request Aug 25, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP

PR: #329
k0kubun pushed a commit that referenced this pull request Aug 25, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
k0kubun pushed a commit that referenced this pull request Aug 25, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
k0kubun pushed a commit that referenced this pull request Aug 25, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
k0kubun pushed a commit that referenced this pull request Aug 25, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
k0kubun pushed a commit that referenced this pull request Aug 26, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
noahgibbs pushed a commit that referenced this pull request Aug 26, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
k0kubun pushed a commit that referenced this pull request Aug 26, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
k0kubun pushed a commit that referenced this pull request Aug 29, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
k0kubun pushed a commit that referenced this pull request Aug 29, 2022
* Move to/from SP on AArch64

* Consolidate loads and stores

* Implement LDR post-index and LDR pre-index for AArch64

* Implement STR post-index and STR pre-index for AArch64

* Module entrypoints for LDR pre/post -index and STR pre/post -index

* Use STR (pre-index) and LDR (post-index) to implement push/pop

* Go back to using MOV for to/from SP
@kddnewton kddnewton deleted the fixes branch November 3, 2023 15:19
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.

None yet

2 participants