Commit caef959
committed
s390x: Implement full SIMD support
This adds full support for all Cranelift SIMD instructions
to the s390x target. Everything is matched fully via ISLE.
In addition to adding support for many new instructions,
and the lower.isle code to match all SIMD IR patterns,
this patch also adds ABI support for vector types.
In particular, we now need to handle the fact that
vector registers 8 .. 15 are partially callee-saved,
i.e. the high parts of those registers (which correspond
to the old floating-poing registers) are callee-saved,
but the low parts are not. This is the exact same situation
that we already have on AArch64, and so this patch uses the
same solution (the is_included_in_clobbers callback).
The bulk of the changes are platform-specific, but there are
a few exceptions:
- Added ISLE extractors for the Immediate and Constant types,
to enable matching the vconst and swizzle instructions.
- Added a missing accessor for call_conv to ABISig.
- Fixed endian conversion for vector types in data_value.rs
to enable their use in runtests on the big-endian platforms.
- Enabled (nearly) all SIMD runtests on s390x. [ Two test cases
remain disabled due to vector shift count semantics, see below. ]
- Enabled all Wasmtime SIMD tests on s390x.
There are three minor issues, called out via FIXMEs below,
which should be addressed in the future, but should not be
blockers to getting this patch merged. I've opened the
following issues to track them:
- Vector shift count semantics
#4424
- is_included_in_clobbers vs. link register
#4425
- gen_constant callback
#4426
All tests, including all newly enabled SIMD tests, pass
on both z14 and z15 architectures.1 parent 6c70428 commit caef959
75 files changed
Lines changed: 17187 additions & 1129 deletions
File tree
- cranelift
- codegen/src
- isa/s390x
- inst
- lower
- machinst
- filetests/filetests
- isa/s390x
- runtests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | 174 | | |
178 | 175 | | |
179 | 176 | | |
180 | 177 | | |
181 | 178 | | |
182 | 179 | | |
183 | 180 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| |||
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
121 | 139 | | |
122 | 140 | | |
123 | 141 | | |
| |||
140 | 158 | | |
141 | 159 | | |
142 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
143 | 176 | | |
144 | 177 | | |
145 | 178 | | |
| |||
182 | 215 | | |
183 | 216 | | |
184 | 217 | | |
| 218 | + | |
185 | 219 | | |
186 | 220 | | |
187 | 221 | | |
| |||
206 | 240 | | |
207 | 241 | | |
208 | 242 | | |
209 | | - | |
210 | | - | |
| 243 | + | |
| 244 | + | |
211 | 245 | | |
212 | 246 | | |
213 | 247 | | |
214 | 248 | | |
215 | 249 | | |
216 | 250 | | |
217 | 251 | | |
218 | | - | |
| 252 | + | |
219 | 253 | | |
220 | 254 | | |
221 | 255 | | |
222 | 256 | | |
223 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
224 | 264 | | |
225 | 265 | | |
226 | 266 | | |
| |||
252 | 292 | | |
253 | 293 | | |
254 | 294 | | |
255 | | - | |
| 295 | + | |
| 296 | + | |
256 | 297 | | |
257 | 298 | | |
258 | 299 | | |
| |||
477 | 518 | | |
478 | 519 | | |
479 | 520 | | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
480 | 528 | | |
481 | 529 | | |
482 | 530 | | |
| |||
534 | 582 | | |
535 | 583 | | |
536 | 584 | | |
537 | | - | |
| 585 | + | |
| 586 | + | |
538 | 587 | | |
539 | 588 | | |
540 | 589 | | |
541 | 590 | | |
542 | 591 | | |
543 | 592 | | |
| 593 | + | |
544 | 594 | | |
545 | 595 | | |
546 | 596 | | |
| |||
566 | 616 | | |
567 | 617 | | |
568 | 618 | | |
569 | | - | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
570 | 627 | | |
571 | 628 | | |
572 | 629 | | |
| |||
578 | 635 | | |
579 | 636 | | |
580 | 637 | | |
581 | | - | |
| 638 | + | |
| 639 | + | |
582 | 640 | | |
583 | 641 | | |
584 | 642 | | |
585 | 643 | | |
586 | 644 | | |
587 | 645 | | |
| 646 | + | |
588 | 647 | | |
589 | 648 | | |
590 | 649 | | |
| |||
639 | 698 | | |
640 | 699 | | |
641 | 700 | | |
642 | | - | |
| 701 | + | |
643 | 702 | | |
644 | 703 | | |
645 | 704 | | |
| |||
739 | 798 | | |
740 | 799 | | |
741 | 800 | | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
742 | 816 | | |
743 | 817 | | |
744 | 818 | | |
| |||
747 | 821 | | |
748 | 822 | | |
749 | 823 | | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
750 | 832 | | |
751 | 833 | | |
752 | 834 | | |
| |||
0 commit comments