-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pulley: Implement get_frame_pointer
#9658
pulley: Implement get_frame_pointer
#9658
Conversation
Subscribe to Label Action
This issue or pull request has been labeled: "cranelift", "isle", "pulley"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
35a0761
to
93a7c06
Compare
This commit implements the CLIF `get_frame_pointer` instruction which will be needed by trampolines in Wasmtime. This is implemented by generalizing the preexisting `GetSp` `MInst` into a "get special". This the additionally removes the extended `get_sp` opcode in Pulley as it's not necessary as `xmov` can operate on this register.
93a7c06
to
52ada12
Compare
ping @cfallin, mind taking a look at this? |
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.
Sorry, missed this review request! LGTM with a few minor bits below.
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.
FWIW, I kind of wanted to have the special registers not accessible by regular xmov
/xadd
/etc... so we could have 32 regular x registers (and the compact 5 bit representaton for all regular x registers) and then for our handful of special registers we would just have special instructions for manipulating.
This would trade using additional (presumably extended) opcodes for gaining more GPRs, which should help us avoid that many more regalloc spills. Spills result in more instructions, which means more turns of the interpreter loop, which is (expected to be) the most expensive part of wasm execution under pulley.
Not something we need to do now but it's something to think about as we design the instruction set, and maybe we should avoid similar changes as those included in this PR which move us away from that vision in the future where we can.
Yeah I've been thinking similarly that I'd prefer to take these registers out of the gpr set, I've opened #9747 and added this there. |
This commit implements the CLIF
get_frame_pointer
instruction which will be needed by trampolines in Wasmtime. This is implemented by generalizing the preexistingGetSp
MInst
into a "get special". This the additionally removes the extendedget_sp
opcode in Pulley as it's not necessary asxmov
can operate on this register.