julian-seward1 opened PR #2312 from arm64-simd-pminmax-round
to main
:
…structions
This patch implements, for aarch64, the following wasm SIMD extensions
Floating-point rounding instructions
https://github.com/WebAssembly/simd/pull/232Pseudo-Minimum and Pseudo-Maximum instructions
https://github.com/WebAssembly/simd/pull/122The changes are straightforward:
build.rs
: the relevant tests have been enabled
cranelift/codegen/meta/src/shared/instructions.rs
: new CLIF instructions
fmin_pseudo
andfmax_pseudo
. The wasm rounding instructions do not need
any new CLIF instructions.
cranelift/wasm/src/code_translator.rs
: translation into CLIF; this is
pretty much the same as any other unary or binary vector instruction (for
the rounding and the pmin/max respectively)
cranelift/codegen/src/isa/aarch64/lower_inst.rs
:
fmin_pseudo
andfmax_pseudo
are converted into a two instruction
sequence,fcmpgt
followed bybsl
the CLIF rounding instructions are converted to a suitable vector
frint{n,z,p,m}
instruction.
cranelift/codegen/src/isa/aarch64/inst/mod.rs
: minor extension ofpub enum VecMisc2
to handle the rounding operations. And correspondingemit
cases.<!--
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.
-->
julian-seward1 requested yurydelendik for a review on PR #2312.
yurydelendik submitted PR Review.
yurydelendik created PR Review Comment:
Based on the referred PR and tests cases at simd_XX_pmin_pmax.wast's , the NaN behavior is different. I recommend to copy
pmin(a, b) := b < a ? b : a
definition language here is extract NaN propagation from it.
yurydelendik edited PR Review Comment.
yurydelendik submitted PR Review.
julian-seward1 updated PR #2312 from arm64-simd-pminmax-round
to main
:
…structions
This patch implements, for aarch64, the following wasm SIMD extensions
Floating-point rounding instructions
https://github.com/WebAssembly/simd/pull/232Pseudo-Minimum and Pseudo-Maximum instructions
https://github.com/WebAssembly/simd/pull/122The changes are straightforward:
build.rs
: the relevant tests have been enabled
cranelift/codegen/meta/src/shared/instructions.rs
: new CLIF instructions
fmin_pseudo
andfmax_pseudo
. The wasm rounding instructions do not need
any new CLIF instructions.
cranelift/wasm/src/code_translator.rs
: translation into CLIF; this is
pretty much the same as any other unary or binary vector instruction (for
the rounding and the pmin/max respectively)
cranelift/codegen/src/isa/aarch64/lower_inst.rs
:
fmin_pseudo
andfmax_pseudo
are converted into a two instruction
sequence,fcmpgt
followed bybsl
the CLIF rounding instructions are converted to a suitable vector
frint{n,z,p,m}
instruction.
cranelift/codegen/src/isa/aarch64/inst/mod.rs
: minor extension ofpub enum VecMisc2
to handle the rounding operations. And correspondingemit
cases.<!--
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.
-->
julian-seward1 updated PR #2312 from arm64-simd-pminmax-round
to main
:
…structions
This patch implements, for aarch64, the following wasm SIMD extensions
Floating-point rounding instructions
https://github.com/WebAssembly/simd/pull/232Pseudo-Minimum and Pseudo-Maximum instructions
https://github.com/WebAssembly/simd/pull/122The changes are straightforward:
build.rs
: the relevant tests have been enabled
cranelift/codegen/meta/src/shared/instructions.rs
: new CLIF instructions
fmin_pseudo
andfmax_pseudo
. The wasm rounding instructions do not need
any new CLIF instructions.
cranelift/wasm/src/code_translator.rs
: translation into CLIF; this is
pretty much the same as any other unary or binary vector instruction (for
the rounding and the pmin/max respectively)
cranelift/codegen/src/isa/aarch64/lower_inst.rs
:
fmin_pseudo
andfmax_pseudo
are converted into a two instruction
sequence,fcmpgt
followed bybsl
the CLIF rounding instructions are converted to a suitable vector
frint{n,z,p,m}
instruction.
cranelift/codegen/src/isa/aarch64/inst/mod.rs
: minor extension ofpub enum VecMisc2
to handle the rounding operations. And correspondingemit
cases.<!--
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.
-->
julian-seward1 updated PR #2312 from arm64-simd-pminmax-round
to main
:
…structions
This patch implements, for aarch64, the following wasm SIMD extensions
Floating-point rounding instructions
https://github.com/WebAssembly/simd/pull/232Pseudo-Minimum and Pseudo-Maximum instructions
https://github.com/WebAssembly/simd/pull/122The changes are straightforward:
build.rs
: the relevant tests have been enabled
cranelift/codegen/meta/src/shared/instructions.rs
: new CLIF instructions
fmin_pseudo
andfmax_pseudo
. The wasm rounding instructions do not need
any new CLIF instructions.
cranelift/wasm/src/code_translator.rs
: translation into CLIF; this is
pretty much the same as any other unary or binary vector instruction (for
the rounding and the pmin/max respectively)
cranelift/codegen/src/isa/aarch64/lower_inst.rs
:
fmin_pseudo
andfmax_pseudo
are converted into a two instruction
sequence,fcmpgt
followed bybsl
the CLIF rounding instructions are converted to a suitable vector
frint{n,z,p,m}
instruction.
cranelift/codegen/src/isa/aarch64/inst/mod.rs
: minor extension ofpub enum VecMisc2
to handle the rounding operations. And correspondingemit
cases.<!--
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.
-->
julian-seward1 updated PR #2312 from arm64-simd-pminmax-round
to main
:
…structions
This patch implements, for aarch64, the following wasm SIMD extensions
Floating-point rounding instructions
https://github.com/WebAssembly/simd/pull/232Pseudo-Minimum and Pseudo-Maximum instructions
https://github.com/WebAssembly/simd/pull/122The changes are straightforward:
build.rs
: the relevant tests have been enabled
cranelift/codegen/meta/src/shared/instructions.rs
: new CLIF instructions
fmin_pseudo
andfmax_pseudo
. The wasm rounding instructions do not need
any new CLIF instructions.
cranelift/wasm/src/code_translator.rs
: translation into CLIF; this is
pretty much the same as any other unary or binary vector instruction (for
the rounding and the pmin/max respectively)
cranelift/codegen/src/isa/aarch64/lower_inst.rs
:
fmin_pseudo
andfmax_pseudo
are converted into a two instruction
sequence,fcmpgt
followed bybsl
the CLIF rounding instructions are converted to a suitable vector
frint{n,z,p,m}
instruction.
cranelift/codegen/src/isa/aarch64/inst/mod.rs
: minor extension ofpub enum VecMisc2
to handle the rounding operations. And correspondingemit
cases.<!--
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.
-->
julian-seward1 merged PR #2312.
Last updated: Dec 23 2024 at 12:05 UTC