Stream: git-wasmtime

Topic: wasmtime / PR #10273 asm: sse orpd implementation


view this post on Zulip Wasmtime GitHub notifications bot (Feb 21 2025 at 22:35):

rahulchaphalkar opened PR #10273 from rahulchaphalkar:sse-orpd-manual-rebase to bytecodealliance:main:

This PR adds xmm registers for SSE instructions, and 1 SSE instruction orpd. Includes 2 new locations xmm and rm128 and the relevant logic.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 21 2025 at 22:35):

rahulchaphalkar requested abrown for a review on PR #10273.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 21 2025 at 22:35):

rahulchaphalkar requested wasmtime-compiler-reviewers for a review on PR #10273.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 21 2025 at 23:44):

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

Subscribe to Label Action

cc @cfallin, @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:x64", "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 (Feb 24 2025 at 21:54):

abrown submitted PR review:

This all makes sense to me. I think the main thing here is to fix CI; the minor refactoring I suggest below shouldn't significantly change this, but #10276 may.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 24 2025 at 21:54):

abrown created PR review comment:

Don't you want something like

                    .all(|&op| matches!(op.location.kind(), OperandKind::Imm(_) | OperandKind::FixedReg(_) | OperandKind::XmmReg(_))

?

view this post on Zulip Wasmtime GitHub notifications bot (Feb 24 2025 at 21:54):

abrown created PR review comment:

            xmm | m128 => format!("self.{self}.to_string()"),

view this post on Zulip Wasmtime GitHub notifications bot (Feb 24 2025 at 21:54):

abrown created PR review comment:

A thought: if we move all of the XMM bits to their own module, xmm.rs, then we don't need this variant here and we can separate the GPR and XMM logic from the pretty-printing below. It's a bit confusing that we ask reg::enc::to_string to print register 0 sometimes as %rax and other times as %xmm0. If we separate this out, then we could refactor to gpr::enc::to_string(enc: u8, size: OperandSize) and xmm::enc::to_string(enc: u8).

view this post on Zulip Wasmtime GitHub notifications bot (Feb 24 2025 at 21:54):

abrown created PR review comment:

Perhaps add a quote to the SSE section below:

Some SSE2/SSE3/SSSE3/SSE4 instructions and instructions using a three-byte sequence of primary opcode bytes may use 66H as a mandatory prefix to express distinct functionality.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 24 2025 at 21:54):

abrown created PR review comment:

We can just call this Xmm and XmmMem and I'll try to remember to rename Reg to Gpr; or alternatively, we might be able to just fit the XMM versions under OperandKind::Reg and OperandKind::RegMem...

view this post on Zulip Wasmtime GitHub notifications bot (Feb 24 2025 at 21:54):

abrown created PR review comment:

This generated code looks a lot like the Reg* versions; that adds some points to keeping the XMM bits under the Reg* kinds. we can always use the locations to figure out whether to emit the Gpr* or Xmm* types.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 25 2025 at 20:43):

rahulchaphalkar updated PR #10273.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 25 2025 at 23:22):

rahulchaphalkar updated PR #10273.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 00:02):

rahulchaphalkar updated PR #10273.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:16):

rahulchaphalkar updated PR #10273.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:19):

rahulchaphalkar submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:19):

rahulchaphalkar created PR review comment:

Changed to check if 128 bits

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:19):

rahulchaphalkar submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:19):

rahulchaphalkar created PR review comment:

Done

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:19):

rahulchaphalkar submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:19):

rahulchaphalkar created PR review comment:

Folded the xmm bits under reg

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:20):

rahulchaphalkar submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:20):

rahulchaphalkar created PR review comment:

Folded xmm bits under reg. It does add several match statements in different places to check 128 bits.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:21):

rahulchaphalkar edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:21):

rahulchaphalkar edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:21):

rahulchaphalkar submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:21):

rahulchaphalkar created PR review comment:

Folded xmm bits under reg.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 26 2025 at 23:22):

rahulchaphalkar commented on PR #10273:

Thanks for the review, @abrown. I've addressed all comments. I'll now look at resolving conflicts.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2025 at 00:29):

rahulchaphalkar updated PR #10273.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 28 2025 at 00:58):

rahulchaphalkar updated PR #10273.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 28 2025 at 01:05):

rahulchaphalkar updated PR #10273.


Last updated: Feb 28 2025 at 02:27 UTC