jlb6740 opened PR #2457 from ceil-floor-trunc-nearest
to main
:
<!--
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.
-->
jlb6740 updated PR #2457 from ceil-floor-trunc-nearest
to main
:
<!--
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.
-->
jlb6740 updated PR #2457 from ceil-floor-trunc-nearest
to main
:
<!--
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.
-->
jlb6740 updated PR #2457 from ceil-floor-trunc-nearest
to main
:
<!--
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.
-->
jlb6740 updated PR #2457 from ceil-floor-trunc-nearest
to main
:
<!--
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.
-->
jlb6740 has marked PR #2457 as ready for review.
jlb6740 updated PR #2457 from ceil-floor-trunc-nearest
to main
:
<!--
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.
-->
jlb6740 requested cfallin for a review on PR #2457.
jlb6740 requested cfallin and abrown for a review on PR #2457.
abrown submitted PR Review.
abrown submitted PR Review.
abrown created PR Review Comment:
I think these two tests should be merged with the block above which already has the "check for x64 or aarch64" logic.
abrown created PR Review Comment:
This comment is still helpful?
abrown created PR Review Comment:
I think you can use the shorter
RegMem::from(dst)
here.
abrown created PR Review Comment:
I noticed that
RoundImm
doesn't mention bit 2 (indicating where rounding is controlled) and bit 3 (the precision mask). Do you want to document this even if we don't implement that part? Right now we are implicitly setting both of those bits to 0.
abrown created PR Review Comment:
I know this isn't part of the PR, but it is curious that these are implemented as lib calls instead of using
ROUNDSD
andROUNDSS
--@bnjbvr, do you know why this is? I wonder if there is some NaN handling there that we should also be doing for the packed version...
abrown created PR Review Comment:
For reference, here is the NaN paragraph from the manual for
ROUNDPD
:The Precision Floating-Point Exception is signaled according to the immediate operand. If any source operand is an SNaN then it will be converted to a QNaN. If DAZ is set to ‘1 then denormals will be converted to zero before rounding.
jlb6740 submitted PR Review.
jlb6740 created PR Review Comment:
:+1: Yeah, in cases where there is the same gate that makes sense.
jlb6740 submitted PR Review.
jlb6740 created PR Review Comment:
:+1: Yes, will remove. I had it removed in an earlier iteration but in that patch I'd also removed the gate. When I reverted it all I failed to remove this again.
jlb6740 submitted PR Review.
jlb6740 created PR Review Comment:
:+1:
jlb6740 submitted PR Review.
jlb6740 created PR Review Comment:
Using ROUNDSD and ROUNDSS is mentioned as a TODO as if it is just missing. I thought these were implemented this way because SSE2 was the minimum supported and because it was faster to implement. I was trying to discern/confirm what the spec wanted beforehand (even in the non-scalar before Ben implemented) and I didn't read in any compatibility with the spec and the line about conversion to QNaN but perhaps Ben has a better idea.
jlb6740 submitted PR Review.
jlb6740 created PR Review Comment:
:+1: Will add a note.
bnjbvr submitted PR Review.
bnjbvr created PR Review Comment:
Yes, roundss/roundsd are sse4.1 or si, if I remember correctly? Definitely worth adding for the scalar case when the right SSE level is available!
I recall that the wasm spec follows what the hardware does for NaNs for these opcodes, at least in the scalar case.
jlb6740 submitted PR Review.
jlb6740 created PR Review Comment:
:+1: Yes, should be a straight forward follow-up patch. I can submit that.
jlb6740 updated PR #2457 from ceil-floor-trunc-nearest
to main
:
<!--
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.
-->
jlb6740 merged PR #2457.
Last updated: Dec 23 2024 at 12:05 UTC