Commit 1efb50d
committed
CL/aarch64: implement the wasm SIMD
This patch implements, for aarch64, the following wasm SIMD extensions.
v128.load32_zero and v128.load64_zero instructions
WebAssembly/simd#237
The changes are straightforward:
* no new CLIF instructions. They are translated into an existing CLIF scalar
load followed by a CLIF `scalar_to_vector`.
* the comment/specification for CLIF `scalar_to_vector` has been changed to
match the actual intended semantics, per consulation with Andrew Brown.
* translation from `scalar_to_vector` to the obvious aarch64 insns.
* special-case zero in `lower_constant_f128` in order to avoid a
potentially slow call to `Inst::load_fp_constant128`.
* Once "Allow loads to merge into other operations during instruction
selection in MachInst backends"
(bytecodealliance#2340) lands,
we can use that functionality to pattern match the two-CLIF pair and
emit a single AArch64 instruction.
There is no testcase in this commit, because that is a separate repo. The
implementation has been tested, nevertheless.v128.load{32,64}_zero instructions.1 parent 5a5fb11 commit 1efb50d
File tree
4 files changed
+58
-17
lines changed- cranelift
- codegen
- src/isa/aarch64
- wasm/src
4 files changed
+58
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3798 | 3798 | | |
3799 | 3799 | | |
3800 | 3800 | | |
3801 | | - | |
3802 | | - | |
3803 | | - | |
3804 | | - | |
3805 | | - | |
3806 | | - | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
3807 | 3804 | | |
3808 | 3805 | | |
3809 | 3806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
844 | 854 | | |
845 | 855 | | |
846 | 856 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2056 | 2056 | | |
2057 | 2057 | | |
2058 | 2058 | | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
2059 | 2084 | | |
2060 | 2085 | | |
2061 | 2086 | | |
| |||
2341 | 2366 | | |
2342 | 2367 | | |
2343 | 2368 | | |
2344 | | - | |
2345 | 2369 | | |
2346 | 2370 | | |
2347 | 2371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1426 | 1426 | | |
1427 | 1427 | | |
1428 | 1428 | | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
1429 | 1441 | | |
1430 | 1442 | | |
1431 | 1443 | | |
| |||
1790 | 1802 | | |
1791 | 1803 | | |
1792 | 1804 | | |
1793 | | - | |
1794 | | - | |
1795 | | - | |
1796 | | - | |
1797 | 1805 | | |
1798 | 1806 | | |
1799 | 1807 | | |
| |||
2516 | 2524 | | |
2517 | 2525 | | |
2518 | 2526 | | |
2519 | | - | |
| 2527 | + | |
| 2528 | + | |
2520 | 2529 | | |
2521 | 2530 | | |
2522 | 2531 | | |
| |||
2528 | 2537 | | |
2529 | 2538 | | |
2530 | 2539 | | |
2531 | | - | |
| 2540 | + | |
| 2541 | + | |
2532 | 2542 | | |
2533 | 2543 | | |
2534 | 2544 | | |
| |||
0 commit comments