forked from erlang/otp
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement emit_apply_fun_shared #12
Draft
ziopio
wants to merge
18
commits into
arm32-jit
Choose a base branch
from
ziopio/emit_apply_fun_shared
base: arm32-jit
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1d4c7ab
Implement part of mov_imm
maehjam c708cf7
WIP implement emit_apply_fun_shared
maehjam 5f84fe3
Add test for malformed list
ziopio 83b6c88
Add emit_ptr_val
ziopio 5585f3c
Use r12 as TMP scratch register
ziopio f6b9197
Remove list TAG to expose the true address of the CONS pair
ziopio c2f65f7
load 2 consecutive words from memory
ziopio 64b68b0
Store CAR in XREG0
ziopio fec174f
Increment ARG3, jump if < (MAX_REG -1)
ziopio 113cb38
Store function and argument list back into the Xregisters
ziopio 4b4dbb5
Store the error reason that is in ARG1 into the proper location
ziopio 6daae65
Move address of apply_mfa into ARG4 and jump to raise_exception
ziopio b975285
Use branch to jump to LR address and return to the calling function
ziopio 4ec3b1c
Use Branch and exchange to return to the calling function
ziopio db0127b
Set Mem shift to 2
ziopio 83c8c08
Use helper functions to get CAR and CDR for better readability
ziopio e148e74
Initialize the x_register memory object with just the base register
ziopio 12dc47a
Fix typo of commas, use semicolon
ziopio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 fails emission....
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.
Passing a Mem object is fine and emission succeeds wiht getXRef(0) but it fails if the operand has been setup with setIndex and setShift.
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.
According to ChatGPT we need another register to use
STR
: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.
In this code the register used as base register is inside x_register memory object operator. It is defined at creation using one of the available constructors of class
arm::Mem
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.
I don't get the steps anyway. The return of getCARRef is type arm:mem and x_register is type arm:mem. Can we just directly put the return of getCARRef in x_register?
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 fails because getXReg adds an offset and we want to use a scale and an index register. We cannot use everything.
A correct initialization would be
auto x_register = arm::Mem(scheduler_registers);