Stream: git-wasmtime

Topic: wasmtime / PR #9658 pulley: Implement `get_frame_pointer`


view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 20:27):

alexcrichton opened PR #9658 from alexcrichton:pulley-get-fp to bytecodealliance:main:

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.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 20:27):

alexcrichton requested cfallin for a review on PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 20:27):

alexcrichton requested wasmtime-default-reviewers for a review on PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 20:27):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 20:42):

alexcrichton updated PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 21:44):

github-actions[bot] commented on PR #9658:

Subscribe to Label Action

cc @cfallin, @fitzgen

<details>
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 <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 22:56):

alexcrichton updated PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 26 2024 at 01:10):

alexcrichton updated PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2024 at 15:51):

alexcrichton updated PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2024 at 15:52):

alexcrichton commented on PR #9658:

ping @cfallin, mind taking a look at this?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2024 at 17:18):

cfallin submitted PR review:

Sorry, missed this review request! LGTM with a few minor bits below.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2024 at 17:18):

cfallin created PR review comment:

s/register/registers/

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2024 at 17:18):

cfallin created PR review comment:

nit but end comment with .?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2024 at 17:18):

cfallin created PR review comment:

Can we add an assert here that reg is one of the special registers?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2024 at 18:16):

alexcrichton updated PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2024 at 18:17):

alexcrichton has enabled auto merge for PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2024 at 18:49):

alexcrichton merged PR #9658.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 20:49):

fitzgen submitted PR review:

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.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 21:16):

alexcrichton commented on PR #9658:

Yeah I've been thinking similarly that I'd prefer to take these registers out of the gpr set, I've opened https://github.com/bytecodealliance/wasmtime/issues/9747 and added this there.


Last updated: Dec 23 2024 at 12:05 UTC