uweigand opened PR #5196 from bitcast-lanes
to main
:
Add a MemFlags operand to the bitcast instruction, where only the
big
andlittle
flags are accepted. These define the lane order to be used when casting between types of different lane counts.Update all users to pass an appropriate MemFlags argument.
Implement lane swaps where necessary in the s390x back-end.
This is the final part necessary to fix
https://github.com/bytecodealliance/wasmtime/issues/4566.CC @cfallin
This is still a RFC because of the following questions:
- Should we enforce that a byte order flag must be explicitly specified if the types differ in lane count? (This would be easily doable in the verifier.)
- There was some discussion in the issue whether or not the
MemFlags
API is the right choice. It seems that way to me, since it makes the semantics easy to specific, and is simple to implement based on the already existingMemFlags
infrastructure. If you prefer some other implementation, please let me know - I'd be happy to change this.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
uweigand updated PR #5196 from bitcast-lanes
to main
.
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
s/using/both using/, just for clarity (other possibilities here include storing with one
MemFlags
and loading with another, which isn't what we're emulating but someone might imagine this instead)
uweigand updated PR #5196 from bitcast-lanes
to main
.
Last updated: Nov 22 2024 at 17:03 UTC