rahulchaphalkar opened PR #10273 from rahulchaphalkar:sse-orpd-manual-rebase
to bytecodealliance:main
:
This PR adds
xmm
registers for SSE instructions, and 1 SSE instructionorpd
. Includes 2 new locationsxmm
andrm128
and the relevant logic.
rahulchaphalkar requested abrown for a review on PR #10273.
rahulchaphalkar requested wasmtime-compiler-reviewers for a review on PR #10273.
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:
- cfallin: isle
- fitzgen: isle
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
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.
abrown created PR review comment:
Don't you want something like
.all(|&op| matches!(op.location.kind(), OperandKind::Imm(_) | OperandKind::FixedReg(_) | OperandKind::XmmReg(_))
?
abrown created PR review comment:
xmm | m128 => format!("self.{self}.to_string()"),
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 askreg::enc::to_string
to print register 0 sometimes as%rax
and other times as%xmm0
. If we separate this out, then we could refactor togpr::enc::to_string(enc: u8, size: OperandSize)
andxmm::enc::to_string(enc: u8)
.
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.
abrown created PR review comment:
We can just call this
Xmm
andXmmMem
and I'll try to remember to renameReg
toGpr
; or alternatively, we might be able to just fit the XMM versions underOperandKind::Reg
andOperandKind::RegMem
...
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 theReg*
kinds. we can always use the locations to figure out whether to emit theGpr*
orXmm*
types.
rahulchaphalkar updated PR #10273.
rahulchaphalkar updated PR #10273.
rahulchaphalkar updated PR #10273.
rahulchaphalkar updated PR #10273.
rahulchaphalkar submitted PR review.
rahulchaphalkar created PR review comment:
Changed to check if 128 bits
rahulchaphalkar submitted PR review.
rahulchaphalkar created PR review comment:
Done
rahulchaphalkar submitted PR review.
rahulchaphalkar created PR review comment:
Folded the xmm bits under reg
rahulchaphalkar submitted PR review.
rahulchaphalkar created PR review comment:
Folded xmm bits under reg. It does add several match statements in different places to check 128 bits.
rahulchaphalkar edited PR review comment.
rahulchaphalkar edited PR review comment.
rahulchaphalkar submitted PR review.
rahulchaphalkar created PR review comment:
Folded xmm bits under reg.
rahulchaphalkar commented on PR #10273:
Thanks for the review, @abrown. I've addressed all comments. I'll now look at resolving conflicts.
rahulchaphalkar updated PR #10273.
rahulchaphalkar updated PR #10273.
rahulchaphalkar updated PR #10273.
Last updated: Feb 28 2025 at 02:27 UTC