Stream: git-wasmtime

Topic: wasmtime / PR #8403 cranelift/aarch64: Simplify generatin...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2024 at 18:40):

jameysharp opened PR #8403 from jameysharp:simplify-aarch64-constants to bytecodealliance:main:

While reviewing #8393 I found the existing load_constant64_full function nearly incomprehensible, so I rewrote it. Besides having many fewer cases now, this should also fix part of the bug that #8393 addresses, but that PR fixes other issues as well.

This PR changes the operand size that we emit for some cases from 32-bit to 64-bit. In those cases, the operand size doesn't matter because we want the upper 32 bits to be zero. We set them that way with the initial instruction: widening movz from 32-bit to 64-bit doesn't change anything. And we preserve the upper bits with subsequent movk instructions, instead of zeroing them, but they were already zero.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2024 at 18:40):

jameysharp requested elliottt for a review on PR #8403.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2024 at 18:40):

jameysharp requested wasmtime-compiler-reviewers for a review on PR #8403.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2024 at 18:44):

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

Subscribe to Label Action

cc @cfallin, @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "isle"

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 (Apr 18 2024 at 21:12):

jameysharp updated PR #8403.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2024 at 21:14):

jameysharp commented on PR #8403:

#8393 landed so I've rebased this.

Also, I've switched to an implementation which I believe generates exactly the same instructions as the prior implementation in all cases. There are some choices we could make which would synthesize the same constants using a different sequence of instructions, but in almost all cases we'd produce the same number of instructions, so it doesn't make much difference. This algorithm is simple and produces readable disassembly listings so we might as well preserve the existing behavior.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2024 at 21:15):

elliottt submitted PR review:

Awesome!

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

jameysharp has enabled auto merge for PR #8403.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2024 at 21:55):

jameysharp merged PR #8403.


Last updated: Dec 23 2024 at 12:05 UTC