forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
riscv64: Implement SIMD
icmp
(bytecodealliance#6609)
These are implemented as a combination of two steps, mask generation and mask expansion. Our comparision rules only return their results as a mask register, so we need to expand the mask into lane sized elements. We have 20 (!) comparision instructions, nearly the full table of all IntCC codes in VV, VX and VI formats. However there are some holes in this table. They are: * `vmsltu.vi` * `vmslt.vi` * `vmsgtu.vv` * `vmsgt.vv` * `vmsgeu.*` * `vmsge.*` Most of these can be replaces with the inverted IntCC instruction, however this commit only implements the existing instructions without any inversion and the inverted VV versions of `sgtu`/`sgt`/`sgeu`/`sge` since we need them to get the full icmp functionality. I've split the actual mask expansion into it's own separate rule since we are going to need it for the `fcmp` rules as well. The instruction selection for `icmp` is on a separate rule simply because the rulse end up less verbose than if they were inlined directly into the `icmp` rule.
- Loading branch information
Showing
24 changed files
with
3,999 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.