aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/riscv/riscv-vector-builtins-functions.def
blob: 49887ec8de69cf4ee5cde94b94b3e5bea13237ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
/* Intrinsic define macros for RISC-V 'V' Extension for GNU compiler.
   Copyright (C) 2022-2024 Free Software Foundation, Inc.
   Contributed by Juzhe Zhong (juzhe.zhong@rivai.ai), RiVAI Technologies Ltd.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */

/* Use "DEF_RVV_FUNCTION" macro to define RVV intrinsic functions.

     - NAME not only describes the base_name of the functions
       but also point to the name of the function_base class.

     - SHAPE point to the function_shape class.

     - PREDS describes the predication types that are supported in the
       functions.

     - OPS_INFO describes all information of return type and each
       argument type.

*/
#ifndef DEF_RVV_FUNCTION
#define DEF_RVV_FUNCTION(NAME, SHAPE, PREDS, OPS_INFO)
#endif

#define REQUIRED_EXTENSIONS VECTOR_EXT
/* Internal helper functions for gimple fold use.  */
DEF_RVV_FUNCTION (read_vl, read_vl, none_preds, p_none_void_ops)
DEF_RVV_FUNCTION (vlenb, vlenb, none_preds, ul_none_void_ops)

/* 6. Configuration-Setting Instructions.  */

DEF_RVV_FUNCTION (vsetvl, vsetvl, none_preds, i_none_size_size_ops)
DEF_RVV_FUNCTION (vsetvlmax, vsetvlmax, none_preds, i_none_size_void_ops)

/* 7. Vector Loads and Stores. */

// 7.4. Vector Unit-Stride Instructions
DEF_RVV_FUNCTION (vle, loadstore, full_preds, all_v_scalar_const_ptr_ops)
DEF_RVV_FUNCTION (vse, loadstore, none_m_preds, all_v_scalar_ptr_ops)
DEF_RVV_FUNCTION (vlm, loadstore, none_preds, b_v_scalar_const_ptr_ops)
DEF_RVV_FUNCTION (vsm, loadstore, none_preds, b_v_scalar_ptr_ops)

// 7.5. Vector Strided Instructions
DEF_RVV_FUNCTION (vlse, loadstore, full_preds, all_v_scalar_const_ptr_ptrdiff_ops)
DEF_RVV_FUNCTION (vsse, loadstore, none_m_preds, all_v_scalar_ptr_ptrdiff_ops)

// 7.6. Vector Indexed Instructions
DEF_RVV_FUNCTION (vluxei8, indexed_loadstore, full_preds, all_v_scalar_const_ptr_eew8_index_ops)
DEF_RVV_FUNCTION (vluxei16, indexed_loadstore, full_preds, all_v_scalar_const_ptr_eew16_index_ops)
DEF_RVV_FUNCTION (vluxei32, indexed_loadstore, full_preds, all_v_scalar_const_ptr_eew32_index_ops)
DEF_RVV_FUNCTION (vluxei64, indexed_loadstore, full_preds, all_v_scalar_const_ptr_eew64_index_ops)
DEF_RVV_FUNCTION (vloxei8, indexed_loadstore, full_preds, all_v_scalar_const_ptr_eew8_index_ops)
DEF_RVV_FUNCTION (vloxei16, indexed_loadstore, full_preds, all_v_scalar_const_ptr_eew16_index_ops)
DEF_RVV_FUNCTION (vloxei32, indexed_loadstore, full_preds, all_v_scalar_const_ptr_eew32_index_ops)
DEF_RVV_FUNCTION (vloxei64, indexed_loadstore, full_preds, all_v_scalar_const_ptr_eew64_index_ops)
DEF_RVV_FUNCTION (vsuxei8, indexed_loadstore, none_m_preds, all_v_scalar_ptr_eew8_index_ops)
DEF_RVV_FUNCTION (vsuxei16, indexed_loadstore, none_m_preds, all_v_scalar_ptr_eew16_index_ops)
DEF_RVV_FUNCTION (vsuxei32, indexed_loadstore, none_m_preds, all_v_scalar_ptr_eew32_index_ops)
DEF_RVV_FUNCTION (vsuxei64, indexed_loadstore, none_m_preds, all_v_scalar_ptr_eew64_index_ops)
DEF_RVV_FUNCTION (vsoxei8, indexed_loadstore, none_m_preds, all_v_scalar_ptr_eew8_index_ops)
DEF_RVV_FUNCTION (vsoxei16, indexed_loadstore, none_m_preds, all_v_scalar_ptr_eew16_index_ops)
DEF_RVV_FUNCTION (vsoxei32, indexed_loadstore, none_m_preds, all_v_scalar_ptr_eew32_index_ops)
DEF_RVV_FUNCTION (vsoxei64, indexed_loadstore, none_m_preds, all_v_scalar_ptr_eew64_index_ops)

// 7.7. Unit-stride Fault-Only-First Loads
DEF_RVV_FUNCTION (vleff, fault_load, full_preds, all_v_scalar_const_ptr_size_ptr_ops)

/* 11. Vector Integer Arithmetic Instructions.  */

// 11.1. Vector Single-Width Integer Add and Subtract
DEF_RVV_FUNCTION (vadd, alu, full_preds, iu_vvv_ops)
DEF_RVV_FUNCTION (vadd, alu, full_preds, iu_vvx_ops)
DEF_RVV_FUNCTION (vsub, alu, full_preds, iu_vvv_ops)
DEF_RVV_FUNCTION (vsub, alu, full_preds, iu_vvx_ops)
DEF_RVV_FUNCTION (vrsub, alu, full_preds, iu_vvx_ops)
DEF_RVV_FUNCTION (vneg, alu, full_preds, iu_v_ops)

// 11.2. Vector Widening Integer Add/Subtract
DEF_RVV_FUNCTION (vwaddu, widen_alu, full_preds, u_wvv_ops)
DEF_RVV_FUNCTION (vwaddu, widen_alu, full_preds, u_wvx_ops)
DEF_RVV_FUNCTION (vwsubu, widen_alu, full_preds, u_wvv_ops)
DEF_RVV_FUNCTION (vwsubu, widen_alu, full_preds, u_wvx_ops)
DEF_RVV_FUNCTION (vwadd, widen_alu, full_preds, i_wvv_ops)
DEF_RVV_FUNCTION (vwadd, widen_alu, full_preds, i_wvx_ops)
DEF_RVV_FUNCTION (vwsub, widen_alu, full_preds, i_wvv_ops)
DEF_RVV_FUNCTION (vwsub, widen_alu, full_preds, i_wvx_ops)
DEF_RVV_FUNCTION (vwaddu, widen_alu, full_preds, u_wwv_ops)
DEF_RVV_FUNCTION (vwaddu, widen_alu, full_preds, u_wwx_ops)
DEF_RVV_FUNCTION (vwsubu, widen_alu, full_preds, u_wwv_ops)
DEF_RVV_FUNCTION (vwsubu, widen_alu, full_preds, u_wwx_ops)
DEF_RVV_FUNCTION (vwadd, widen_alu, full_preds, i_wwv_ops)
DEF_RVV_FUNCTION (vwadd, widen_alu, full_preds, i_wwx_ops)
DEF_RVV_FUNCTION (vwsub, widen_alu, full_preds, i_wwv_ops)
DEF_RVV_FUNCTION (vwsub, widen_alu, full_preds, i_wwx_ops)
DEF_RVV_FUNCTION (vwcvt_x, alu, full_preds, i_x_x_v_ops)
DEF_RVV_FUNCTION (vwcvtu_x, alu, full_preds, u_x_x_v_ops)

// 11.3. Vector Integer Extension
DEF_RVV_FUNCTION (vzext, widen_alu, full_preds, u_vf2_ops)
DEF_RVV_FUNCTION (vzext, widen_alu, full_preds, u_vf4_ops)
DEF_RVV_FUNCTION (vzext, widen_alu, full_preds, u_vf8_ops)
DEF_RVV_FUNCTION (vsext, widen_alu, full_preds, i_vf2_ops)
DEF_RVV_FUNCTION (vsext, widen_alu, full_preds, i_vf4_ops)
DEF_RVV_FUNCTION (vsext, widen_alu, full_preds, i_vf8_ops)

// 11.4. Vector Integer Add-with-Carry/Subtract-with-Borrow Instructions
DEF_RVV_FUNCTION (vadc, no_mask_policy, none_tu_preds, iu_vvvm_ops)
DEF_RVV_FUNCTION (vadc, no_mask_policy, none_tu_preds, iu_vvxm_ops)
DEF_RVV_FUNCTION (vmadc, return_mask, none_preds, iu_mvvm_ops)
DEF_RVV_FUNCTION (vmadc, return_mask, none_preds, iu_mvxm_ops)
DEF_RVV_FUNCTION (vmadc, return_mask, none_preds, iu_mvv_ops)
DEF_RVV_FUNCTION (vmadc, return_mask, none_preds, iu_mvx_ops)
DEF_RVV_FUNCTION (vsbc, no_mask_policy, none_tu_preds, iu_vvvm_ops)
DEF_RVV_FUNCTION (vsbc, no_mask_policy, none_tu_preds, iu_vvxm_ops)
DEF_RVV_FUNCTION (vmsbc, return_mask, none_preds, iu_mvvm_ops)
DEF_RVV_FUNCTION (vmsbc, return_mask, none_preds, iu_mvxm_ops)
DEF_RVV_FUNCTION (vmsbc, return_mask, none_preds, iu_mvv_ops)
DEF_RVV_FUNCTION (vmsbc, return_mask, none_preds, iu_mvx_ops)

// 11.5. Vector Bitwise Logical Instructions
DEF_RVV_FUNCTION (vand, alu, full_preds, iu_vvv_ops)
DEF_RVV_FUNCTION (vand, alu, full_preds, iu_vvx_ops)
DEF_RVV_FUNCTION (vor, alu, full_preds, iu_vvv_ops)
DEF_RVV_FUNCTION (vor, alu, full_preds, iu_vvx_ops)
DEF_RVV_FUNCTION (vxor, alu, full_preds, iu_vvv_ops)
DEF_RVV_FUNCTION (vxor, alu, full_preds, iu_vvx_ops)
DEF_RVV_FUNCTION (vnot, alu, full_preds, iu_v_ops)

// 11.6. Vector Single-Width Shift Instructions
DEF_RVV_FUNCTION (vsll, alu, full_preds, iu_shift_vvv_ops)
DEF_RVV_FUNCTION (vsll, alu, full_preds, iu_shift_vvx_ops)
DEF_RVV_FUNCTION (vsra, alu, full_preds, i_shift_vvv_ops)
DEF_RVV_FUNCTION (vsra, alu, full_preds, i_shift_vvx_ops)
DEF_RVV_FUNCTION (vsrl, alu, full_preds, u_shift_vvv_ops)
DEF_RVV_FUNCTION (vsrl, alu, full_preds, u_shift_vvx_ops)

// 11.7. Vector Narrowing Integer Right Shift Instructions
DEF_RVV_FUNCTION (vnsrl, narrow_alu, full_preds, u_narrow_shift_vwv_ops)
DEF_RVV_FUNCTION (vnsrl, narrow_alu, full_preds, u_narrow_shift_vwx_ops)
DEF_RVV_FUNCTION (vnsra, narrow_alu, full_preds, i_narrow_shift_vwv_ops)
DEF_RVV_FUNCTION (vnsra, narrow_alu, full_preds, i_narrow_shift_vwx_ops)
DEF_RVV_FUNCTION (vncvt_x, narrow_alu, full_preds, iu_trunc_ops)

// 11.8. Vector Integer Compare Instructions
DEF_RVV_FUNCTION (vmseq, return_mask, none_m_mu_preds, iu_mvv_ops)
DEF_RVV_FUNCTION (vmseq, return_mask, none_m_mu_preds, iu_mvx_ops)
DEF_RVV_FUNCTION (vmsne, return_mask, none_m_mu_preds, iu_mvv_ops)
DEF_RVV_FUNCTION (vmsne, return_mask, none_m_mu_preds, iu_mvx_ops)
DEF_RVV_FUNCTION (vmsltu, return_mask, none_m_mu_preds, u_mvv_ops)
DEF_RVV_FUNCTION (vmsltu, return_mask, none_m_mu_preds, u_mvx_ops)
DEF_RVV_FUNCTION (vmslt, return_mask, none_m_mu_preds, i_mvv_ops)
DEF_RVV_FUNCTION (vmslt, return_mask, none_m_mu_preds, i_mvx_ops)
DEF_RVV_FUNCTION (vmsleu, return_mask, none_m_mu_preds, u_mvv_ops)
DEF_RVV_FUNCTION (vmsleu, return_mask, none_m_mu_preds, u_mvx_ops)
DEF_RVV_FUNCTION (vmsle, return_mask, none_m_mu_preds, i_mvv_ops)
DEF_RVV_FUNCTION (vmsle, return_mask, none_m_mu_preds, i_mvx_ops)
DEF_RVV_FUNCTION (vmsgtu, return_mask, none_m_mu_preds, u_mvv_ops)
DEF_RVV_FUNCTION (vmsgtu, return_mask, none_m_mu_preds, u_mvx_ops)
DEF_RVV_FUNCTION (vmsgt, return_mask, none_m_mu_preds, i_mvv_ops)
DEF_RVV_FUNCTION (vmsgt, return_mask, none_m_mu_preds, i_mvx_ops)
DEF_RVV_FUNCTION (vmsgeu, return_mask, none_m_mu_preds, u_mvv_ops)
DEF_RVV_FUNCTION (vmsgeu, return_mask, none_m_mu_preds, u_mvx_ops)
DEF_RVV_FUNCTION (vmsge, return_mask, none_m_mu_preds, i_mvv_ops)
DEF_RVV_FUNCTION (vmsge, return_mask, none_m_mu_preds, i_mvx_ops)

// 11.9. Vector Integer Min/Max Instructions
DEF_RVV_FUNCTION (vminu, alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vminu, alu, full_preds, u_vvx_ops)
DEF_RVV_FUNCTION (vmin, alu, full_preds, i_vvv_ops)
DEF_RVV_FUNCTION (vmin, alu, full_preds, i_vvx_ops)
DEF_RVV_FUNCTION (vmaxu, alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vmaxu, alu, full_preds, u_vvx_ops)
DEF_RVV_FUNCTION (vmax, alu, full_preds, i_vvv_ops)
DEF_RVV_FUNCTION (vmax, alu, full_preds, i_vvx_ops)

// 11.10. Vector Single-Width Integer Multiply Instructions
DEF_RVV_FUNCTION (vmul, alu, full_preds, iu_vvv_ops)
DEF_RVV_FUNCTION (vmul, alu, full_preds, iu_vvx_ops)
DEF_RVV_FUNCTION (vmulh, alu, full_preds, full_v_i_vvv_ops)
DEF_RVV_FUNCTION (vmulh, alu, full_preds, full_v_i_vvx_ops)
DEF_RVV_FUNCTION (vmulhu, alu, full_preds, full_v_u_vvv_ops)
DEF_RVV_FUNCTION (vmulhu, alu, full_preds, full_v_u_vvx_ops)
DEF_RVV_FUNCTION (vmulhsu, alu, full_preds, full_v_i_su_vvv_ops)
DEF_RVV_FUNCTION (vmulhsu, alu, full_preds, full_v_i_su_vvx_ops)

// 11.11. Vector Integer Divide Instructions
DEF_RVV_FUNCTION (vdivu, alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vdivu, alu, full_preds, u_vvx_ops)
DEF_RVV_FUNCTION (vdiv, alu, full_preds, i_vvv_ops)
DEF_RVV_FUNCTION (vdiv, alu, full_preds, i_vvx_ops)
DEF_RVV_FUNCTION (vremu, alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vremu, alu, full_preds, u_vvx_ops)
DEF_RVV_FUNCTION (vrem, alu, full_preds, i_vvv_ops)
DEF_RVV_FUNCTION (vrem, alu, full_preds, i_vvx_ops)

// 11.12. Vector Widening Integer Multiply Instructions
DEF_RVV_FUNCTION (vwmul, alu, full_preds, i_wvv_ops)
DEF_RVV_FUNCTION (vwmul, alu, full_preds, i_wvx_ops)
DEF_RVV_FUNCTION (vwmulu, alu, full_preds, u_wvv_ops)
DEF_RVV_FUNCTION (vwmulu, alu, full_preds, u_wvx_ops)
DEF_RVV_FUNCTION (vwmulsu, alu, full_preds, i_su_wvv_ops)
DEF_RVV_FUNCTION (vwmulsu, alu, full_preds, i_su_wvx_ops)

// 11.13. Vector Single-Width Integer Multiply-Add Instructions
DEF_RVV_FUNCTION (vmacc, alu, full_preds, iu_vvvv_ops)
DEF_RVV_FUNCTION (vmacc, alu, full_preds, iu_vvxv_ops)
DEF_RVV_FUNCTION (vnmsac, alu, full_preds, iu_vvvv_ops)
DEF_RVV_FUNCTION (vnmsac, alu, full_preds, iu_vvxv_ops)
DEF_RVV_FUNCTION (vmadd, alu, full_preds, iu_vvvv_ops)
DEF_RVV_FUNCTION (vmadd, alu, full_preds, iu_vvxv_ops)
DEF_RVV_FUNCTION (vnmsub, alu, full_preds, iu_vvvv_ops)
DEF_RVV_FUNCTION (vnmsub, alu, full_preds, iu_vvxv_ops)

// 11.14. Vector Widening Integer Multiply-Add Instructions
DEF_RVV_FUNCTION (vwmaccu, alu, full_preds, u_wwvv_ops)
DEF_RVV_FUNCTION (vwmaccu, alu, full_preds, u_wwxv_ops)
DEF_RVV_FUNCTION (vwmacc, alu, full_preds, i_wwvv_ops)
DEF_RVV_FUNCTION (vwmacc, alu, full_preds, i_wwxv_ops)
DEF_RVV_FUNCTION (vwmaccsu, alu, full_preds, i_su_wwvv_ops)
DEF_RVV_FUNCTION (vwmaccsu, alu, full_preds, i_su_wwxv_ops)
DEF_RVV_FUNCTION (vwmaccus, alu, full_preds, i_us_wwxv_ops)

// 11.15. Vector Integer Merge Instructions
DEF_RVV_FUNCTION (vmerge, no_mask_policy, none_tu_preds, all_vvvm_ops)
DEF_RVV_FUNCTION (vmerge, no_mask_policy, none_tu_preds, iu_vvxm_ops)

// 11.16 Vector Integer Move Instructions
DEF_RVV_FUNCTION (vmv_v, move, none_tu_preds, all_v_ops)
DEF_RVV_FUNCTION (vmv_v, move, none_tu_preds, iu_x_ops)

/* 12. Vector Fixed-Point Arithmetic Instructions. */

// 12.1. Vector Single-Width Saturating Add and Subtract
DEF_RVV_FUNCTION (vsaddu, alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vsaddu, alu, full_preds, u_vvx_ops)
DEF_RVV_FUNCTION (vsadd, alu, full_preds, i_vvv_ops)
DEF_RVV_FUNCTION (vsadd, alu, full_preds, i_vvx_ops)
DEF_RVV_FUNCTION (vssubu, alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vssubu, alu, full_preds, u_vvx_ops)
DEF_RVV_FUNCTION (vssub, alu, full_preds, i_vvv_ops)
DEF_RVV_FUNCTION (vssub, alu, full_preds, i_vvx_ops)

// 12.2. Vector Single-Width Averaging Add and Subtract
DEF_RVV_FUNCTION (vaaddu, alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vaaddu, alu, full_preds, u_vvx_ops)
DEF_RVV_FUNCTION (vaadd, alu, full_preds, i_vvv_ops)
DEF_RVV_FUNCTION (vaadd, alu, full_preds, i_vvx_ops)
DEF_RVV_FUNCTION (vasubu, alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vasubu, alu, full_preds, u_vvx_ops)
DEF_RVV_FUNCTION (vasub, alu, full_preds, i_vvv_ops)
DEF_RVV_FUNCTION (vasub, alu, full_preds, i_vvx_ops)

// 12.3. Vector Single-Width Fractional Multiply with Rounding and Saturation
DEF_RVV_FUNCTION (vsmul, alu, full_preds, full_v_i_vvv_ops)
DEF_RVV_FUNCTION (vsmul, alu, full_preds, full_v_i_vvx_ops)

// 12.4. Vector Single-Width Scaling Shift Instructions
DEF_RVV_FUNCTION (vssrl, alu, full_preds, u_shift_vvv_ops)
DEF_RVV_FUNCTION (vssrl, alu, full_preds, u_shift_vvx_ops)
DEF_RVV_FUNCTION (vssra, alu, full_preds, i_shift_vvv_ops)
DEF_RVV_FUNCTION (vssra, alu, full_preds, i_shift_vvx_ops)

// 12.5. Vector Narrowing Fixed-Point Clip Instructions
DEF_RVV_FUNCTION (vnclipu, narrow_alu, full_preds, u_narrow_shift_vwv_ops)
DEF_RVV_FUNCTION (vnclipu, narrow_alu, full_preds, u_narrow_shift_vwx_ops)
DEF_RVV_FUNCTION (vnclip, narrow_alu, full_preds, i_narrow_shift_vwv_ops)
DEF_RVV_FUNCTION (vnclip, narrow_alu, full_preds, i_narrow_shift_vwx_ops)

/* 13. Vector Floating-Point Instructions.  */

// 13.2. Vector Single-Width Floating-Point Add/Subtract Instructions
DEF_RVV_FUNCTION (vfadd, alu, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfadd, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfsub, alu, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfsub, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfrsub, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfadd_frm, alu_frm, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfadd_frm, alu_frm, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfsub_frm, alu_frm, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfsub_frm, alu_frm, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfrsub_frm, alu_frm, full_preds, f_vvf_ops)

// 13.3. Vector Widening Floating-Point Add/Subtract Instructions
DEF_RVV_FUNCTION (vfwadd, widen_alu, full_preds, f_wvv_ops)
DEF_RVV_FUNCTION (vfwadd, widen_alu, full_preds, f_wvf_ops)
DEF_RVV_FUNCTION (vfwsub, widen_alu, full_preds, f_wvv_ops)
DEF_RVV_FUNCTION (vfwsub, widen_alu, full_preds, f_wvf_ops)
DEF_RVV_FUNCTION (vfwadd, widen_alu, full_preds, f_wwv_ops)
DEF_RVV_FUNCTION (vfwadd, widen_alu, full_preds, f_wwf_ops)
DEF_RVV_FUNCTION (vfwsub, widen_alu, full_preds, f_wwv_ops)
DEF_RVV_FUNCTION (vfwsub, widen_alu, full_preds, f_wwf_ops)
DEF_RVV_FUNCTION (vfwadd_frm, widen_alu_frm, full_preds, f_wvv_ops)
DEF_RVV_FUNCTION (vfwadd_frm, widen_alu_frm, full_preds, f_wvf_ops)
DEF_RVV_FUNCTION (vfwsub_frm, widen_alu_frm, full_preds, f_wvv_ops)
DEF_RVV_FUNCTION (vfwsub_frm, widen_alu_frm, full_preds, f_wvf_ops)
DEF_RVV_FUNCTION (vfwadd_frm, widen_alu_frm, full_preds, f_wwv_ops)
DEF_RVV_FUNCTION (vfwadd_frm, widen_alu_frm, full_preds, f_wwf_ops)
DEF_RVV_FUNCTION (vfwsub_frm, widen_alu_frm, full_preds, f_wwv_ops)
DEF_RVV_FUNCTION (vfwsub_frm, widen_alu_frm, full_preds, f_wwf_ops)

// 13.4. Vector Single-Width Floating-Point Multiply/Divide Instructions
DEF_RVV_FUNCTION (vfmul, alu, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfmul, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfdiv, alu, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfdiv, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfrdiv, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfmul_frm, alu_frm, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfmul_frm, alu_frm, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfdiv_frm, alu_frm, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfdiv_frm, alu_frm, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfrdiv_frm, alu_frm, full_preds, f_vvf_ops)

// 13.5. Vector Widening Floating-Point Multiply
DEF_RVV_FUNCTION (vfwmul, alu, full_preds, f_wvv_ops)
DEF_RVV_FUNCTION (vfwmul, alu, full_preds, f_wvf_ops)
DEF_RVV_FUNCTION (vfwmul_frm, alu_frm, full_preds, f_wvv_ops)
DEF_RVV_FUNCTION (vfwmul_frm, alu_frm, full_preds, f_wvf_ops)

// 13.6. Vector Single-Width Floating-Point Fused Multiply-Add Instructions
DEF_RVV_FUNCTION (vfmacc, alu, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfmacc, alu, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfnmsac, alu, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfnmsac, alu, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfmadd, alu, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfmadd, alu, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfnmsub, alu, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfnmsub, alu, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfnmacc, alu, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfnmacc, alu, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfmsac, alu, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfmsac, alu, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfnmadd, alu, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfnmadd, alu, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfmsub, alu, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfmsub, alu, full_preds, f_vvfv_ops)

DEF_RVV_FUNCTION (vfmacc_frm, alu_frm, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfmacc_frm, alu_frm, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfnmacc_frm, alu_frm, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfnmacc_frm, alu_frm, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfmsac_frm, alu_frm, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfmsac_frm, alu_frm, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfnmsac_frm, alu_frm, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfnmsac_frm, alu_frm, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfmadd_frm, alu_frm, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfmadd_frm, alu_frm, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfnmadd_frm, alu_frm, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfnmadd_frm, alu_frm, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfmsub_frm, alu_frm, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfmsub_frm, alu_frm, full_preds, f_vvfv_ops)
DEF_RVV_FUNCTION (vfnmsub_frm, alu_frm, full_preds, f_vvvv_ops)
DEF_RVV_FUNCTION (vfnmsub_frm, alu_frm, full_preds, f_vvfv_ops)

// 13.7. Vector Widening Floating-Point Fused Multiply-Add Instructions
DEF_RVV_FUNCTION (vfwmacc, alu, full_preds, f_wwvv_ops)
DEF_RVV_FUNCTION (vfwmacc, alu, full_preds, f_wwfv_ops)
DEF_RVV_FUNCTION (vfwnmacc, alu, full_preds, f_wwvv_ops)
DEF_RVV_FUNCTION (vfwnmacc, alu, full_preds, f_wwfv_ops)
DEF_RVV_FUNCTION (vfwmsac, alu, full_preds, f_wwvv_ops)
DEF_RVV_FUNCTION (vfwmsac, alu, full_preds, f_wwfv_ops)
DEF_RVV_FUNCTION (vfwnmsac, alu, full_preds, f_wwvv_ops)
DEF_RVV_FUNCTION (vfwnmsac, alu, full_preds, f_wwfv_ops)

DEF_RVV_FUNCTION (vfwmacc_frm, alu_frm, full_preds, f_wwvv_ops)
DEF_RVV_FUNCTION (vfwmacc_frm, alu_frm, full_preds, f_wwfv_ops)
DEF_RVV_FUNCTION (vfwnmacc_frm, alu_frm, full_preds, f_wwvv_ops)
DEF_RVV_FUNCTION (vfwnmacc_frm, alu_frm, full_preds, f_wwfv_ops)
DEF_RVV_FUNCTION (vfwmsac_frm, alu_frm, full_preds, f_wwvv_ops)
DEF_RVV_FUNCTION (vfwmsac_frm, alu_frm, full_preds, f_wwfv_ops)
DEF_RVV_FUNCTION (vfwnmsac_frm, alu_frm, full_preds, f_wwvv_ops)
DEF_RVV_FUNCTION (vfwnmsac_frm, alu_frm, full_preds, f_wwfv_ops)

// 13.8. Vector Floating-Point Square-Root Instruction
DEF_RVV_FUNCTION (vfsqrt, alu, full_preds, f_v_ops)

DEF_RVV_FUNCTION (vfsqrt_frm, alu_frm, full_preds, f_v_ops)

// 13.9. Vector Floating-Point Reciprocal Square-Root Estimate Instruction
DEF_RVV_FUNCTION (vfrsqrt7, alu, full_preds, f_v_ops)

// 13.10. Vector Floating-Point Reciprocal Estimate Instruction
DEF_RVV_FUNCTION (vfrec7, alu, full_preds, f_v_ops)

DEF_RVV_FUNCTION (vfrec7_frm, alu_frm, full_preds, f_v_ops)

// 13.11. Vector Floating-Point MIN/MAX Instructions
DEF_RVV_FUNCTION (vfmin, alu, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfmin, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfmax, alu, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfmax, alu, full_preds, f_vvf_ops)

// 13.12. Vector Floating-Point Sign-Injection Instructions
DEF_RVV_FUNCTION (vfsgnj, alu, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfsgnj, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfsgnjn, alu, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfsgnjn, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfsgnjx, alu, full_preds, f_vvv_ops)
DEF_RVV_FUNCTION (vfsgnjx, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfneg, alu, full_preds, f_v_ops)
DEF_RVV_FUNCTION (vfabs, alu, full_preds, f_v_ops)

// 13.13. Vector Floating-Point Compare Instructions
DEF_RVV_FUNCTION (vmfeq, return_mask, none_m_mu_preds, f_mvv_ops)
DEF_RVV_FUNCTION (vmfeq, return_mask, none_m_mu_preds, f_mvf_ops)
DEF_RVV_FUNCTION (vmfne, return_mask, none_m_mu_preds, f_mvv_ops)
DEF_RVV_FUNCTION (vmfne, return_mask, none_m_mu_preds, f_mvf_ops)
DEF_RVV_FUNCTION (vmflt, return_mask, none_m_mu_preds, f_mvv_ops)
DEF_RVV_FUNCTION (vmflt, return_mask, none_m_mu_preds, f_mvf_ops)
DEF_RVV_FUNCTION (vmfle, return_mask, none_m_mu_preds, f_mvv_ops)
DEF_RVV_FUNCTION (vmfle, return_mask, none_m_mu_preds, f_mvf_ops)
DEF_RVV_FUNCTION (vmfgt, return_mask, none_m_mu_preds, f_mvv_ops)
DEF_RVV_FUNCTION (vmfgt, return_mask, none_m_mu_preds, f_mvf_ops)
DEF_RVV_FUNCTION (vmfge, return_mask, none_m_mu_preds, f_mvv_ops)
DEF_RVV_FUNCTION (vmfge, return_mask, none_m_mu_preds, f_mvf_ops)

// 13.14. Vector Floating-Point Classify Instruction
DEF_RVV_FUNCTION (vfclass, alu, full_preds, f_to_u_v_ops)

// 13.15. Vector Floating-Point Merge Instruction
DEF_RVV_FUNCTION (vfmerge, no_mask_policy, none_tu_preds, f_vvfm_ops)

// 13.16. Vector Floating-Point Move Instruction
DEF_RVV_FUNCTION (vfmv_v, move, none_tu_preds, f_f_ops)

// 13.17. Single-Width Floating-Point/Integer Type-Convert Instructions
DEF_RVV_FUNCTION (vfcvt_x, alu, full_preds, f_to_i_f_v_ops)
DEF_RVV_FUNCTION (vfcvt_xu, alu, full_preds, f_to_u_f_v_ops)
DEF_RVV_FUNCTION (vfcvt_rtz_x, alu, full_preds, f_to_i_f_v_ops)
DEF_RVV_FUNCTION (vfcvt_rtz_xu, alu, full_preds, f_to_u_f_v_ops)
DEF_RVV_FUNCTION (vfcvt_f, alu, full_preds, i_to_f_x_v_ops)
DEF_RVV_FUNCTION (vfcvt_f, alu, full_preds, u_to_f_xu_v_ops)

DEF_RVV_FUNCTION (vfcvt_x_frm, alu_frm, full_preds, f_to_i_f_v_ops)
DEF_RVV_FUNCTION (vfcvt_xu_frm, alu_frm, full_preds, f_to_u_f_v_ops)
DEF_RVV_FUNCTION (vfcvt_f_frm, alu_frm, full_preds, i_to_f_x_v_ops)
DEF_RVV_FUNCTION (vfcvt_f_frm, alu_frm, full_preds, u_to_f_xu_v_ops)

// 13.18. Widening Floating-Point/Integer Type-Convert Instructions
DEF_RVV_FUNCTION (vfwcvt_x, alu, full_preds, f_to_wi_f_v_ops)
DEF_RVV_FUNCTION (vfwcvt_xu, alu, full_preds, f_to_wu_f_v_ops)
DEF_RVV_FUNCTION (vfwcvt_rtz_x, alu, full_preds, f_to_wi_f_v_ops)
DEF_RVV_FUNCTION (vfwcvt_rtz_xu, alu, full_preds, f_to_wu_f_v_ops)
DEF_RVV_FUNCTION (vfwcvt_f, alu, full_preds, i_to_wf_x_v_ops)
DEF_RVV_FUNCTION (vfwcvt_f, alu, full_preds, u_to_wf_xu_v_ops)
DEF_RVV_FUNCTION (vfwcvt_f, alu, full_preds, f_to_wf_f_v_ops)

DEF_RVV_FUNCTION (vfwcvt_x_frm, alu_frm, full_preds, f_to_wi_f_v_ops)
DEF_RVV_FUNCTION (vfwcvt_xu_frm, alu_frm, full_preds, f_to_wu_f_v_ops)

// 13.19. Narrowing Floating-Point/Integer Type-Convert Instructions
DEF_RVV_FUNCTION (vfncvt_x, narrow_alu, full_preds, f_to_ni_f_w_ops)
DEF_RVV_FUNCTION (vfncvt_xu, narrow_alu, full_preds, f_to_nu_f_w_ops)
DEF_RVV_FUNCTION (vfncvt_rtz_x, narrow_alu, full_preds, f_to_ni_f_w_ops)
DEF_RVV_FUNCTION (vfncvt_rtz_xu, narrow_alu, full_preds, f_to_nu_f_w_ops)
DEF_RVV_FUNCTION (vfncvt_f, narrow_alu, full_preds, i_to_nf_x_w_ops)
DEF_RVV_FUNCTION (vfncvt_f, narrow_alu, full_preds, u_to_nf_xu_w_ops)
DEF_RVV_FUNCTION (vfncvt_f, narrow_alu, full_preds, f_to_nf_f_w_ops)
DEF_RVV_FUNCTION (vfncvt_rod_f, narrow_alu, full_preds, f_to_nf_f_w_ops)

DEF_RVV_FUNCTION (vfncvt_x_frm, narrow_alu_frm, full_preds, f_to_ni_f_w_ops)
DEF_RVV_FUNCTION (vfncvt_xu_frm, narrow_alu_frm, full_preds, f_to_nu_f_w_ops)
DEF_RVV_FUNCTION (vfncvt_f_frm, narrow_alu_frm, full_preds, i_to_nf_x_w_ops)
DEF_RVV_FUNCTION (vfncvt_f_frm, narrow_alu_frm, full_preds, u_to_nf_xu_w_ops)
DEF_RVV_FUNCTION (vfncvt_f_frm, narrow_alu_frm, full_preds, f_to_nf_f_w_ops)

/* 14. Vector Reduction Operations.  */

// 14.1. Vector Single-Width Integer Reduction Instructions
DEF_RVV_FUNCTION (vredsum, reduc_alu, no_mu_preds, iu_vs_ops)
DEF_RVV_FUNCTION (vredmaxu, reduc_alu, no_mu_preds, iu_vs_ops)
DEF_RVV_FUNCTION (vredmax, reduc_alu, no_mu_preds, iu_vs_ops)
DEF_RVV_FUNCTION (vredminu, reduc_alu, no_mu_preds, iu_vs_ops)
DEF_RVV_FUNCTION (vredmin, reduc_alu, no_mu_preds, iu_vs_ops)
DEF_RVV_FUNCTION (vredand, reduc_alu, no_mu_preds, iu_vs_ops)
DEF_RVV_FUNCTION (vredor, reduc_alu, no_mu_preds, iu_vs_ops)
DEF_RVV_FUNCTION (vredxor, reduc_alu, no_mu_preds, iu_vs_ops)

// 14.2. Vector Widening Integer Reduction Instructions
DEF_RVV_FUNCTION (vwredsum, reduc_alu, no_mu_preds, wi_vs_ops)
DEF_RVV_FUNCTION (vwredsumu, reduc_alu, no_mu_preds, wu_vs_ops)

// 14.3. Vector Single-Width Floating-Point Reduction Instructions
DEF_RVV_FUNCTION (vfredusum, reduc_alu, no_mu_preds, f_vs_ops)
DEF_RVV_FUNCTION (vfredosum, reduc_alu, no_mu_preds, f_vs_ops)
DEF_RVV_FUNCTION (vfredmax, reduc_alu, no_mu_preds, f_vs_ops)
DEF_RVV_FUNCTION (vfredmin, reduc_alu, no_mu_preds, f_vs_ops)

DEF_RVV_FUNCTION (vfredusum_frm, reduc_alu_frm, no_mu_preds, f_vs_ops)
DEF_RVV_FUNCTION (vfredosum_frm, reduc_alu_frm, no_mu_preds, f_vs_ops)

// 14.4. Vector Widening Floating-Point Reduction Instructions
DEF_RVV_FUNCTION (vfwredosum, reduc_alu, no_mu_preds, wf_vs_ops)
DEF_RVV_FUNCTION (vfwredusum, reduc_alu, no_mu_preds, wf_vs_ops)

DEF_RVV_FUNCTION (vfwredosum_frm, reduc_alu_frm, no_mu_preds, wf_vs_ops)
DEF_RVV_FUNCTION (vfwredusum_frm, reduc_alu_frm, no_mu_preds, wf_vs_ops)

/* 15. Vector Mask Instructions.  */

// 15.1. Vector Mask-Register Logical Instructions
DEF_RVV_FUNCTION (vmand, mask_alu, none_preds, b_mmm_ops)
DEF_RVV_FUNCTION (vmnand, mask_alu, none_preds, b_mmm_ops)
DEF_RVV_FUNCTION (vmandn, mask_alu, none_preds, b_mmm_ops)
DEF_RVV_FUNCTION (vmxor, mask_alu, none_preds, b_mmm_ops)
DEF_RVV_FUNCTION (vmor, mask_alu, none_preds, b_mmm_ops)
DEF_RVV_FUNCTION (vmnor, mask_alu, none_preds, b_mmm_ops)
DEF_RVV_FUNCTION (vmorn, mask_alu, none_preds, b_mmm_ops)
DEF_RVV_FUNCTION (vmxnor, mask_alu, none_preds, b_mmm_ops)
DEF_RVV_FUNCTION (vmmv, mask_alu, none_preds, b_mm_ops)
DEF_RVV_FUNCTION (vmclr, mask_alu, none_preds, b_m_ops)
DEF_RVV_FUNCTION (vmset, mask_alu, none_preds, b_m_ops)
DEF_RVV_FUNCTION (vmnot, mask_alu, none_preds, b_mm_ops)
// 15.2. Vector count population in mask vcpop.m
DEF_RVV_FUNCTION (vcpop, mask_alu, none_m_preds, b_ulong_m_ops)
// 15.3. vfirst find-first-set mask bit
DEF_RVV_FUNCTION (vfirst, mask_alu, none_m_preds, b_long_m_ops)
// 15.4. vmsbf.m set-before-first mask bit
DEF_RVV_FUNCTION (vmsbf, mask_alu, none_m_mu_preds, b_mm_ops)
// 15.5. vmsif.m set-including-first mask bit
DEF_RVV_FUNCTION (vmsif, mask_alu, none_m_mu_preds, b_mm_ops)
// 15.6. vmsof.m set-only-first mask bit
DEF_RVV_FUNCTION (vmsof, mask_alu, none_m_mu_preds, b_mm_ops)
// 15.8. Vector Iota Instruction
DEF_RVV_FUNCTION (viota, mask_alu, full_preds, u_vm_ops)
// 15.9. Vector Element Index Instruction
DEF_RVV_FUNCTION (vid, alu, full_preds, u_v_ops)

/* 16. Vector Permutation Instructions.  */

// 16.1. Integer Scalar Move Instructions
DEF_RVV_FUNCTION (vmv_x, scalar_move, none_preds, iu_x_s_ops)
DEF_RVV_FUNCTION (vmv_s, move, none_tu_preds, iu_s_x_ops)

// 16.2. Floating-Point Scalar Move Instructions
DEF_RVV_FUNCTION (vfmv_f, scalar_move, none_preds, f_f_s_ops)
DEF_RVV_FUNCTION (vfmv_s, move, none_tu_preds, f_s_f_ops)

// 16.3. Vector Slide Instructions
DEF_RVV_FUNCTION (vslideup, alu, full_preds, all_vvvx_ops)
DEF_RVV_FUNCTION (vslidedown, alu, full_preds, all_vvx_ops)
DEF_RVV_FUNCTION (vslide1up, alu, full_preds, iu_vvx_ops)
DEF_RVV_FUNCTION (vslide1down, alu, full_preds, iu_vvx_ops)
DEF_RVV_FUNCTION (vfslide1up, alu, full_preds, f_vvf_ops)
DEF_RVV_FUNCTION (vfslide1down, alu, full_preds, f_vvf_ops)

// 16.4. Vector Register Gather Instructions
DEF_RVV_FUNCTION (vrgather, alu, full_preds, all_gather_vvv_ops)
DEF_RVV_FUNCTION (vrgather, alu, full_preds, all_gather_vvx_ops)
DEF_RVV_FUNCTION (vrgatherei16, alu, full_preds, all_gatherei16_vvv_ops)

// 16.5. Vector Compress Instruction
DEF_RVV_FUNCTION (vcompress, alu, none_tu_preds, all_vvm_ops)

/* Miscellaneous Vector Functions.  */
DEF_RVV_FUNCTION (vundefined, vundefined, none_preds, all_none_void_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, i_v_u_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, u_v_i_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, f_v_i_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, f_v_u_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, i_v_f_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, u_v_f_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_eew8_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_eew16_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_eew32_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_eew64_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_bool1_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_bool2_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_bool4_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_bool8_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_bool16_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_bool32_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, iu_v_bool64_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, b_v_signed_eew8_lmul1_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, b_v_signed_eew16_lmul1_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, b_v_signed_eew32_lmul1_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, b_v_signed_eew64_lmul1_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, b_v_unsigned_eew8_lmul1_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, b_v_unsigned_eew16_lmul1_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, b_v_unsigned_eew32_lmul1_interpret_ops)
DEF_RVV_FUNCTION (vreinterpret, misc, none_preds, b_v_unsigned_eew64_lmul1_interpret_ops)
DEF_RVV_FUNCTION (vlmul_ext, misc, none_preds, all_v_vlmul_ext_x2_ops)
DEF_RVV_FUNCTION (vlmul_ext, misc, none_preds, all_v_vlmul_ext_x4_ops)
DEF_RVV_FUNCTION (vlmul_ext, misc, none_preds, all_v_vlmul_ext_x8_ops)
DEF_RVV_FUNCTION (vlmul_ext, misc, none_preds, all_v_vlmul_ext_x16_ops)
DEF_RVV_FUNCTION (vlmul_ext, misc, none_preds, all_v_vlmul_ext_x32_ops)
DEF_RVV_FUNCTION (vlmul_ext, misc, none_preds, all_v_vlmul_ext_x64_ops)
DEF_RVV_FUNCTION (vlmul_trunc, misc, none_preds, all_v_vlmul_trunc_x2_ops)
DEF_RVV_FUNCTION (vlmul_trunc, misc, none_preds, all_v_vlmul_trunc_x4_ops)
DEF_RVV_FUNCTION (vlmul_trunc, misc, none_preds, all_v_vlmul_trunc_x8_ops)
DEF_RVV_FUNCTION (vlmul_trunc, misc, none_preds, all_v_vlmul_trunc_x16_ops)
DEF_RVV_FUNCTION (vlmul_trunc, misc, none_preds, all_v_vlmul_trunc_x32_ops)
DEF_RVV_FUNCTION (vlmul_trunc, misc, none_preds, all_v_vlmul_trunc_x64_ops)
DEF_RVV_FUNCTION (vset, vset, none_preds, all_v_vset_lmul1_x2_ops)
DEF_RVV_FUNCTION (vset, vset, none_preds, all_v_vset_lmul1_x4_ops)
DEF_RVV_FUNCTION (vset, vset, none_preds, all_v_vset_lmul1_x8_ops)
DEF_RVV_FUNCTION (vset, vset, none_preds, all_v_vset_lmul2_x2_ops)
DEF_RVV_FUNCTION (vset, vset, none_preds, all_v_vset_lmul2_x4_ops)
DEF_RVV_FUNCTION (vset, vset, none_preds, all_v_vset_lmul4_x2_ops)
DEF_RVV_FUNCTION (vget, vget, none_preds, all_v_vget_lmul1_x2_ops)
DEF_RVV_FUNCTION (vget, vget, none_preds, all_v_vget_lmul1_x4_ops)
DEF_RVV_FUNCTION (vget, vget, none_preds, all_v_vget_lmul1_x8_ops)
DEF_RVV_FUNCTION (vget, vget, none_preds, all_v_vget_lmul2_x2_ops)
DEF_RVV_FUNCTION (vget, vget, none_preds, all_v_vget_lmul2_x4_ops)
DEF_RVV_FUNCTION (vget, vget, none_preds, all_v_vget_lmul4_x2_ops)
DEF_RVV_FUNCTION (vcreate, vcreate, none_preds, all_v_vcreate_lmul1_x2_ops)
DEF_RVV_FUNCTION (vcreate, vcreate, none_preds, all_v_vcreate_lmul1_x4_ops)
DEF_RVV_FUNCTION (vcreate, vcreate, none_preds, all_v_vcreate_lmul1_x8_ops)
DEF_RVV_FUNCTION (vcreate, vcreate, none_preds, all_v_vcreate_lmul2_x2_ops)
DEF_RVV_FUNCTION (vcreate, vcreate, none_preds, all_v_vcreate_lmul2_x4_ops)
DEF_RVV_FUNCTION (vcreate, vcreate, none_preds, all_v_vcreate_lmul4_x2_ops)

// Tuple types
DEF_RVV_FUNCTION (vset, vset, none_preds, all_v_vset_tuple_ops)
DEF_RVV_FUNCTION (vget, vget, none_preds, all_v_vget_tuple_ops)
DEF_RVV_FUNCTION (vcreate, vcreate, none_preds, all_v_vcreate_tuple_ops)
DEF_RVV_FUNCTION (vundefined, vundefined, none_preds, all_none_void_tuple_ops)

// 7.8. Vector Load/Store Segment Instructions
DEF_RVV_FUNCTION (vlseg, seg_loadstore, full_preds, tuple_v_scalar_const_ptr_ops)
DEF_RVV_FUNCTION (vsseg, seg_loadstore, none_m_preds, tuple_v_scalar_ptr_ops)
DEF_RVV_FUNCTION (vlsseg, seg_loadstore, full_preds, tuple_v_scalar_const_ptr_ptrdiff_ops)
DEF_RVV_FUNCTION (vssseg, seg_loadstore, none_m_preds, tuple_v_scalar_ptr_ptrdiff_ops)
DEF_RVV_FUNCTION (vluxseg, seg_indexed_loadstore, full_preds, tuple_v_scalar_const_ptr_eew8_index_ops)
DEF_RVV_FUNCTION (vluxseg, seg_indexed_loadstore, full_preds, tuple_v_scalar_const_ptr_eew16_index_ops)
DEF_RVV_FUNCTION (vluxseg, seg_indexed_loadstore, full_preds, tuple_v_scalar_const_ptr_eew32_index_ops)
DEF_RVV_FUNCTION (vluxseg, seg_indexed_loadstore, full_preds, tuple_v_scalar_const_ptr_eew64_index_ops)
DEF_RVV_FUNCTION (vloxseg, seg_indexed_loadstore, full_preds, tuple_v_scalar_const_ptr_eew8_index_ops)
DEF_RVV_FUNCTION (vloxseg, seg_indexed_loadstore, full_preds, tuple_v_scalar_const_ptr_eew16_index_ops)
DEF_RVV_FUNCTION (vloxseg, seg_indexed_loadstore, full_preds, tuple_v_scalar_const_ptr_eew32_index_ops)
DEF_RVV_FUNCTION (vloxseg, seg_indexed_loadstore, full_preds, tuple_v_scalar_const_ptr_eew64_index_ops)
DEF_RVV_FUNCTION (vsuxseg, seg_indexed_loadstore, none_m_preds, tuple_v_scalar_ptr_eew8_index_ops)
DEF_RVV_FUNCTION (vsuxseg, seg_indexed_loadstore, none_m_preds, tuple_v_scalar_ptr_eew16_index_ops)
DEF_RVV_FUNCTION (vsuxseg, seg_indexed_loadstore, none_m_preds, tuple_v_scalar_ptr_eew32_index_ops)
DEF_RVV_FUNCTION (vsuxseg, seg_indexed_loadstore, none_m_preds, tuple_v_scalar_ptr_eew64_index_ops)
DEF_RVV_FUNCTION (vsoxseg, seg_indexed_loadstore, none_m_preds, tuple_v_scalar_ptr_eew8_index_ops)
DEF_RVV_FUNCTION (vsoxseg, seg_indexed_loadstore, none_m_preds, tuple_v_scalar_ptr_eew16_index_ops)
DEF_RVV_FUNCTION (vsoxseg, seg_indexed_loadstore, none_m_preds, tuple_v_scalar_ptr_eew32_index_ops)
DEF_RVV_FUNCTION (vsoxseg, seg_indexed_loadstore, none_m_preds, tuple_v_scalar_ptr_eew64_index_ops)
DEF_RVV_FUNCTION (vlsegff, seg_fault_load, full_preds, tuple_v_scalar_const_ptr_size_ptr_ops)
#undef REQUIRED_EXTENSIONS

/* Definition of crypto vector intrinsic functions */
// ZVBB and ZVKB
#define REQUIRED_EXTENSIONS ZVBB_EXT
DEF_RVV_FUNCTION (vbrev,  alu, full_preds, u_vv_ops)
DEF_RVV_FUNCTION (vclz,   alu, none_m_preds, u_vv_ops)
DEF_RVV_FUNCTION (vctz,   alu, none_m_preds, u_vv_ops)
DEF_RVV_FUNCTION (vwsll,  alu, full_preds, u_wvv_ops)
DEF_RVV_FUNCTION (vwsll,  alu, full_preds, u_shift_wvx_ops)
#undef REQUIRED_EXTENSIONS

#define REQUIRED_EXTENSIONS ZVBB_OR_ZVKB_EXT
DEF_RVV_FUNCTION (vandn,  alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vandn,  alu, full_preds, u_vvx_ops)
DEF_RVV_FUNCTION (vbrev8, alu, full_preds, u_vv_ops)
DEF_RVV_FUNCTION (vrev8,  alu, full_preds, u_vv_ops)
DEF_RVV_FUNCTION (vrol,   alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vror,   alu, full_preds, u_vvv_ops)
DEF_RVV_FUNCTION (vror,   alu, full_preds, u_shift_vvx_ops)
DEF_RVV_FUNCTION (vrol,   alu, full_preds, u_shift_vvx_ops)
#undef REQUIRED_EXTENSIONS
//ZVBC
#define REQUIRED_EXTENSIONS ZVBC_EXT
DEF_RVV_FUNCTION (vclmul,  alu, full_preds, u_vvv_crypto_sew64_ops)
DEF_RVV_FUNCTION (vclmul,  alu, full_preds, u_vvx_crypto_sew64_ops)
DEF_RVV_FUNCTION (vclmulh, alu, full_preds, u_vvv_crypto_sew64_ops)
DEF_RVV_FUNCTION (vclmulh, alu, full_preds, u_vvx_crypto_sew64_ops)
#undef REQUIRED_EXTENSIONS
//ZVKG
#define REQUIRED_EXTENSIONS ZVKG_EXT
DEF_RVV_FUNCTION(vghsh, no_mask_policy, none_tu_preds, u_vvvv_crypto_sew32_ops)
DEF_RVV_FUNCTION(vgmul, no_mask_policy, none_tu_preds, u_vvv_crypto_sew32_ops)
#undef REQUIRED_EXTENSIONS
//ZVKNED
#define REQUIRED_EXTENSIONS ZVKNED_EXT
DEF_RVV_FUNCTION (vaesef,   crypto_vv, none_tu_preds, u_vvv_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaesef,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaesef,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x2_ops)
DEF_RVV_FUNCTION (vaesef,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x4_ops)
DEF_RVV_FUNCTION (vaesef,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x8_ops)
DEF_RVV_FUNCTION (vaesef,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x16_ops)
DEF_RVV_FUNCTION (vaesem,   crypto_vv, none_tu_preds, u_vvv_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaesem,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaesem,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x2_ops)
DEF_RVV_FUNCTION (vaesem,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x4_ops)
DEF_RVV_FUNCTION (vaesem,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x8_ops)
DEF_RVV_FUNCTION (vaesem,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x16_ops)
DEF_RVV_FUNCTION (vaesdf,   crypto_vv, none_tu_preds, u_vvv_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaesdf,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaesdf,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x2_ops)
DEF_RVV_FUNCTION (vaesdf,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x4_ops)
DEF_RVV_FUNCTION (vaesdf,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x8_ops)
DEF_RVV_FUNCTION (vaesdf,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x16_ops)
DEF_RVV_FUNCTION (vaesdm,   crypto_vv, none_tu_preds, u_vvv_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaesdm,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaesdm,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x2_ops)
DEF_RVV_FUNCTION (vaesdm,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x4_ops)
DEF_RVV_FUNCTION (vaesdm,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x8_ops)
DEF_RVV_FUNCTION (vaesdm,   crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x16_ops)
DEF_RVV_FUNCTION (vaesz,    crypto_vv_no_op_type, none_tu_preds, u_vvs_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaesz,    crypto_vv_no_op_type, none_tu_preds, u_vvs_crypto_sew32_lmul_x2_ops)
DEF_RVV_FUNCTION (vaesz,    crypto_vv_no_op_type, none_tu_preds, u_vvs_crypto_sew32_lmul_x4_ops)
DEF_RVV_FUNCTION (vaesz,    crypto_vv_no_op_type, none_tu_preds, u_vvs_crypto_sew32_lmul_x8_ops)
DEF_RVV_FUNCTION (vaesz,    crypto_vv_no_op_type, none_tu_preds, u_vvs_crypto_sew32_lmul_x16_ops)
DEF_RVV_FUNCTION (vaeskf1,  crypto_vi, none_tu_preds, u_vv_size_crypto_sew32_ops)
DEF_RVV_FUNCTION (vaeskf2,  crypto_vi, none_tu_preds, u_vvv_size_crypto_sew32_ops)
#undef REQUIRED_EXTENSIONS
//ZVKNHA
//ZVKNHA and ZVKNHB
#define REQUIRED_EXTENSIONS ZVKNHA_OR_ZVKNHB_EXT
DEF_RVV_FUNCTION (vsha2ms,  no_mask_policy, none_tu_preds, u_vvvv_crypto_sew32_ops)
DEF_RVV_FUNCTION (vsha2ch,  no_mask_policy, none_tu_preds, u_vvvv_crypto_sew32_ops)
DEF_RVV_FUNCTION (vsha2cl,  no_mask_policy, none_tu_preds, u_vvvv_crypto_sew32_ops)
#undef REQUIRED_EXTENSIONS

#define REQUIRED_EXTENSIONS ZVKNHB_EXT
DEF_RVV_FUNCTION (vsha2ms,  no_mask_policy, none_tu_preds, u_vvvv_crypto_sew64_ops)
DEF_RVV_FUNCTION (vsha2ch,  no_mask_policy, none_tu_preds, u_vvvv_crypto_sew64_ops)
DEF_RVV_FUNCTION (vsha2cl,  no_mask_policy, none_tu_preds, u_vvvv_crypto_sew64_ops)
#undef REQUIRED_EXTENSIONS
//Zvksed
#define REQUIRED_EXTENSIONS ZVKSED_EXT
DEF_RVV_FUNCTION (vsm4k, crypto_vi, none_tu_preds, u_vv_size_crypto_sew32_ops)
DEF_RVV_FUNCTION (vsm4r, crypto_vv, none_tu_preds, u_vvv_crypto_sew32_ops)
DEF_RVV_FUNCTION (vsm4r, crypto_vv, none_tu_preds, u_vvs_crypto_sew32_ops)
DEF_RVV_FUNCTION (vsm4r, crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x2_ops)
DEF_RVV_FUNCTION (vsm4r, crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x4_ops)
DEF_RVV_FUNCTION (vsm4r, crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x8_ops)
DEF_RVV_FUNCTION (vsm4r, crypto_vv, none_tu_preds, u_vvs_crypto_sew32_lmul_x16_ops)
#undef REQUIRED_EXTENSIONS
//Zvksh
#define REQUIRED_EXTENSIONS ZVKSH_EXT
DEF_RVV_FUNCTION (vsm3me, no_mask_policy,    none_tu_preds, u_vvv_crypto_sew32_ops)
DEF_RVV_FUNCTION (vsm3c,  crypto_vi,    none_tu_preds, u_vvv_size_crypto_sew32_ops)
#undef REQUIRED_EXTENSIONS

//Zvfbfmin
#define REQUIRED_EXTENSIONS ZVFBFMIN_EXT
DEF_RVV_FUNCTION (vfncvtbf16_f, narrow_alu, full_preds, f32_to_bf16_f_w_ops)
DEF_RVV_FUNCTION (vfncvtbf16_f_frm, narrow_alu_frm, full_preds, f32_to_bf16_f_w_ops)
DEF_RVV_FUNCTION (vfwcvtbf16_f, alu, full_preds, bf16_to_f32_f_v_ops)
#undef REQUIRED_EXTENSIONS

/* Zvfbfwma */
#define REQUIRED_EXTENSIONS ZVFBFWMA_EXT
DEF_RVV_FUNCTION (vfwmaccbf16, alu, full_preds, f32_wwvv_ops)
DEF_RVV_FUNCTION (vfwmaccbf16, alu, full_preds, f32_wwfv_ops)
DEF_RVV_FUNCTION (vfwmaccbf16_frm, alu_frm, full_preds, f32_wwvv_ops)
DEF_RVV_FUNCTION (vfwmaccbf16_frm, alu_frm, full_preds, f32_wwfv_ops)
#undef REQUIRED_EXTENSIONS
#undef DEF_RVV_FUNCTION