elliottt opened PR #5123 from trevor/iadd_overflow_trap
to main
:
- Add iadd_overflow_trap
- Use iadd_overflow_trap instead of iadd_ifcout/trapif
- Add tests for x86_64
- Add aarch64 support for iadd_overflow_trap
- Implement
iadd_overflow_trap
on riscv64- Support iadd_overflow_trap on s390x
<!--
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.
-->
elliottt edited PR #5123 from trevor/iadd_overflow_trap
to main
:
Add a new instruction
iadd_overflow_trap
, which is a fused version ofiadd_ifcout
andtrapif
. Adding this instruction removes a dependency on theiflags
type, and would allow us to move closer to removing it entirely.The instruction is defined for the
i32
andi64
types only, and is currently only used in the legalization ofheap_addr
.<!--
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.
-->
elliottt updated PR #5123 from trevor/iadd_overflow_trap
to main
.
fitzgen submitted PR review.
fitzgen created PR review comment:
I think we can just say
This is the same as
iadd
but traps on overflow instead of wrapping.since
iadd
is a slightly less esoteric instruction thaniadd_cout
.
fitzgen submitted PR review.
elliottt submitted PR review.
elliottt created PR review comment:
That's a good point, thanks!
elliottt updated PR #5123 from trevor/iadd_overflow_trap
to main
.
elliottt has marked PR #5123 as ready for review.
elliottt updated PR #5123 from trevor/iadd_overflow_trap
to main
.
elliottt updated PR #5123 from trevor/iadd_overflow_trap
to main
.
elliottt updated PR #5123 from trevor/iadd_overflow_trap
to main
.
elliottt updated PR #5123 from trevor/iadd_overflow_trap
to main
.
elliottt merged PR #5123.
Last updated: Nov 22 2024 at 16:03 UTC