uweigand opened PR #6079 from s390x-trapif
to main
:
Following up on the discussion in
https://github.com/bytecodealliance/wasmtime/pull/6011 this adds an improved implementation of TrapIf for s390x using a single conditional branch instruction.If the trap conditions is true, we branch into the middle of the branch instruction - those middle two bytes are zero, which matches the encoding of the trap instruction.
<!--
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.
-->
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Could this add some assertions that
enc
has length 6 and the middle 2 bytes are zeros?
alexcrichton created PR review comment:
Like the other backends (which Jamey suggested and I think is a good idea), could this include the trap code in the printing? The other backends do something like
# trap={code}
at the end IIRC
uweigand updated PR #6079 from s390x-trapif
to main
.
uweigand submitted PR review.
uweigand created PR review comment:
Indeed, good idea. I've also added this for the unconditional traps now.
alexcrichton merged PR #6079.
Last updated: Nov 22 2024 at 17:03 UTC