Stream: git-wasmtime

Topic: wasmtime / PR #8467 cranelift/x64: Allow collecting Gpr/X...


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

jameysharp opened PR #8467 from jameysharp:x64-into-reg to bytecodealliance:main:

Previously, the operand collector required its arguments to be of type Reg. But the x86-64 backend uses newtype wrappers around Reg to ensure that different register classes don't get mixed up, so it had to convert types everywhere to pass registers to the operand collector.

This commit allows the operand collector to accept any type which implements Into<Reg> instead. The newtype wrappers already implemented that, so we can mostly just delete the to_reg and to_writable_reg calls.

However, those calls were also automatically dereferencing borrows as needed, so to minimize the need for explicit dereferences I've also introduced implementations for converting from &Gpr/&Xmm to Reg. That doesn't help with the Writable-wrapped registers but it's good enough. I have a PR in progress which will clean it up the rest of the way.

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

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

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

jameysharp requested cfallin for a review on PR #8467.

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

cfallin submitted PR review:

So much cleaner; nice!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2024 at 22:09):

jameysharp merged PR #8467.


Last updated: Nov 22 2024 at 16:03 UTC