[RISCV] Add RVVConstraint to SiFive custom matrix multiply instructions. (#124055)
[llvm-project.git] / clang / test / Driver / print-supported-extensions-riscv.c
blobae3a1c29df397680e2698f6218af4f8e00812716
1 // REQUIRES: riscv-registered-target
2 // RUN: %clang --target=riscv64-linux-gnu --print-supported-extensions | FileCheck --strict-whitespace --implicit-check-not=FEAT_ %s
4 // CHECK: All available -march extensions for RISC-V
5 // CHECK-EMPTY:
6 // CHECK-NEXT: Name Version Description
7 // CHECK-NEXT: i 2.1 'I' (Base Integer Instruction Set)
8 // CHECK-NEXT: e 2.0 'E' (Embedded Instruction Set with 16 GPRs)
9 // CHECK-NEXT: m 2.0 'M' (Integer Multiplication and Division)
10 // CHECK-NEXT: a 2.1 'A' (Atomic Instructions)
11 // CHECK-NEXT: f 2.2 'F' (Single-Precision Floating-Point)
12 // CHECK-NEXT: d 2.2 'D' (Double-Precision Floating-Point)
13 // CHECK-NEXT: c 2.0 'C' (Compressed Instructions)
14 // CHECK-NEXT: b 1.0 'B' (the collection of the Zba, Zbb, Zbs extensions)
15 // CHECK-NEXT: v 1.0 'V' (Vector Extension for Application Processors)
16 // CHECK-NEXT: h 1.0 'H' (Hypervisor)
17 // CHECK-NEXT: zic64b 1.0 'Zic64b' (Cache Block Size Is 64 Bytes)
18 // CHECK-NEXT: zicbom 1.0 'Zicbom' (Cache-Block Management Instructions)
19 // CHECK-NEXT: zicbop 1.0 'Zicbop' (Cache-Block Prefetch Instructions)
20 // CHECK-NEXT: zicboz 1.0 'Zicboz' (Cache-Block Zero Instructions)
21 // CHECK-NEXT: ziccamoa 1.0 'Ziccamoa' (Main Memory Supports All Atomics in A)
22 // CHECK-NEXT: ziccif 1.0 'Ziccif' (Main Memory Supports Instruction Fetch with Atomicity Requirement)
23 // CHECK-NEXT: zicclsm 1.0 'Zicclsm' (Main Memory Supports Misaligned Loads/Stores)
24 // CHECK-NEXT: ziccrse 1.0 'Ziccrse' (Main Memory Supports Forward Progress on LR/SC Sequences)
25 // CHECK-NEXT: zicntr 2.0 'Zicntr' (Base Counters and Timers)
26 // CHECK-NEXT: zicond 1.0 'Zicond' (Integer Conditional Operations)
27 // CHECK-NEXT: zicsr 2.0 'Zicsr' (CSRs)
28 // CHECK-NEXT: zifencei 2.0 'Zifencei' (fence.i)
29 // CHECK-NEXT: zihintntl 1.0 'Zihintntl' (Non-Temporal Locality Hints)
30 // CHECK-NEXT: zihintpause 2.0 'Zihintpause' (Pause Hint)
31 // CHECK-NEXT: zihpm 2.0 'Zihpm' (Hardware Performance Counters)
32 // CHECK-NEXT: zimop 1.0 'Zimop' (May-Be-Operations)
33 // CHECK-NEXT: zmmul 1.0 'Zmmul' (Integer Multiplication)
34 // CHECK-NEXT: za128rs 1.0 'Za128rs' (Reservation Set Size of at Most 128 Bytes)
35 // CHECK-NEXT: za64rs 1.0 'Za64rs' (Reservation Set Size of at Most 64 Bytes)
36 // CHECK-NEXT: zaamo 1.0 'Zaamo' (Atomic Memory Operations)
37 // CHECK-NEXT: zabha 1.0 'Zabha' (Byte and Halfword Atomic Memory Operations)
38 // CHECK-NEXT: zacas 1.0 'Zacas' (Atomic Compare-And-Swap Instructions)
39 // CHECK-NEXT: zalrsc 1.0 'Zalrsc' (Load-Reserved/Store-Conditional)
40 // CHECK-NEXT: zama16b 1.0 'Zama16b' (Atomic 16-byte misaligned loads, stores and AMOs)
41 // CHECK-NEXT: zawrs 1.0 'Zawrs' (Wait on Reservation Set)
42 // CHECK-NEXT: zfa 1.0 'Zfa' (Additional Floating-Point)
43 // CHECK-NEXT: zfbfmin 1.0 'Zfbfmin' (Scalar BF16 Converts)
44 // CHECK-NEXT: zfh 1.0 'Zfh' (Half-Precision Floating-Point)
45 // CHECK-NEXT: zfhmin 1.0 'Zfhmin' (Half-Precision Floating-Point Minimal)
46 // CHECK-NEXT: zfinx 1.0 'Zfinx' (Float in Integer)
47 // CHECK-NEXT: zdinx 1.0 'Zdinx' (Double in Integer)
48 // CHECK-NEXT: zca 1.0 'Zca' (part of the C extension, excluding compressed floating point loads/stores)
49 // CHECK-NEXT: zcb 1.0 'Zcb' (Compressed basic bit manipulation instructions)
50 // CHECK-NEXT: zcd 1.0 'Zcd' (Compressed Double-Precision Floating-Point Instructions)
51 // CHECK-NEXT: zce 1.0 'Zce' (Compressed extensions for microcontrollers)
52 // CHECK-NEXT: zcf 1.0 'Zcf' (Compressed Single-Precision Floating-Point Instructions)
53 // CHECK-NEXT: zcmop 1.0 'Zcmop' (Compressed May-Be-Operations)
54 // CHECK-NEXT: zcmp 1.0 'Zcmp' (sequenced instructions for code-size reduction)
55 // CHECK-NEXT: zcmt 1.0 'Zcmt' (table jump instructions for code-size reduction)
56 // CHECK-NEXT: zba 1.0 'Zba' (Address Generation Instructions)
57 // CHECK-NEXT: zbb 1.0 'Zbb' (Basic Bit-Manipulation)
58 // CHECK-NEXT: zbc 1.0 'Zbc' (Carry-Less Multiplication)
59 // CHECK-NEXT: zbkb 1.0 'Zbkb' (Bitmanip instructions for Cryptography)
60 // CHECK-NEXT: zbkc 1.0 'Zbkc' (Carry-less multiply instructions for Cryptography)
61 // CHECK-NEXT: zbkx 1.0 'Zbkx' (Crossbar permutation instructions)
62 // CHECK-NEXT: zbs 1.0 'Zbs' (Single-Bit Instructions)
63 // CHECK-NEXT: zk 1.0 'Zk' (Standard scalar cryptography extension)
64 // CHECK-NEXT: zkn 1.0 'Zkn' (NIST Algorithm Suite)
65 // CHECK-NEXT: zknd 1.0 'Zknd' (NIST Suite: AES Decryption)
66 // CHECK-NEXT: zkne 1.0 'Zkne' (NIST Suite: AES Encryption)
67 // CHECK-NEXT: zknh 1.0 'Zknh' (NIST Suite: Hash Function Instructions)
68 // CHECK-NEXT: zkr 1.0 'Zkr' (Entropy Source Extension)
69 // CHECK-NEXT: zks 1.0 'Zks' (ShangMi Algorithm Suite)
70 // CHECK-NEXT: zksed 1.0 'Zksed' (ShangMi Suite: SM4 Block Cipher Instructions)
71 // CHECK-NEXT: zksh 1.0 'Zksh' (ShangMi Suite: SM3 Hash Function Instructions)
72 // CHECK-NEXT: zkt 1.0 'Zkt' (Data Independent Execution Latency)
73 // CHECK-NEXT: ztso 1.0 'Ztso' (Memory Model - Total Store Order)
74 // CHECK-NEXT: zvbb 1.0 'Zvbb' (Vector basic bit-manipulation instructions)
75 // CHECK-NEXT: zvbc 1.0 'Zvbc' (Vector Carryless Multiplication)
76 // CHECK-NEXT: zve32f 1.0 'Zve32f' (Vector Extensions for Embedded Processors with maximal 32 EEW and F extension)
77 // CHECK-NEXT: zve32x 1.0 'Zve32x' (Vector Extensions for Embedded Processors with maximal 32 EEW)
78 // CHECK-NEXT: zve64d 1.0 'Zve64d' (Vector Extensions for Embedded Processors with maximal 64 EEW, F and D extension)
79 // CHECK-NEXT: zve64f 1.0 'Zve64f' (Vector Extensions for Embedded Processors with maximal 64 EEW and F extension)
80 // CHECK-NEXT: zve64x 1.0 'Zve64x' (Vector Extensions for Embedded Processors with maximal 64 EEW)
81 // CHECK-NEXT: zvfbfmin 1.0 'Zvfbfmin' (Vector BF16 Converts)
82 // CHECK-NEXT: zvfbfwma 1.0 'Zvfbfwma' (Vector BF16 widening mul-add)
83 // CHECK-NEXT: zvfh 1.0 'Zvfh' (Vector Half-Precision Floating-Point)
84 // CHECK-NEXT: zvfhmin 1.0 'Zvfhmin' (Vector Half-Precision Floating-Point Minimal)
85 // CHECK-NEXT: zvkb 1.0 'Zvkb' (Vector Bit-manipulation used in Cryptography)
86 // CHECK-NEXT: zvkg 1.0 'Zvkg' (Vector GCM instructions for Cryptography)
87 // CHECK-NEXT: zvkn 1.0 'Zvkn' (shorthand for 'Zvkned', 'Zvknhb', 'Zvkb', and 'Zvkt')
88 // CHECK-NEXT: zvknc 1.0 'Zvknc' (shorthand for 'Zvknc' and 'Zvbc')
89 // CHECK-NEXT: zvkned 1.0 'Zvkned' (Vector AES Encryption & Decryption (Single Round))
90 // CHECK-NEXT: zvkng 1.0 'Zvkng' (shorthand for 'Zvkn' and 'Zvkg')
91 // CHECK-NEXT: zvknha 1.0 'Zvknha' (Vector SHA-2 (SHA-256 only))
92 // CHECK-NEXT: zvknhb 1.0 'Zvknhb' (Vector SHA-2 (SHA-256 and SHA-512))
93 // CHECK-NEXT: zvks 1.0 'Zvks' (shorthand for 'Zvksed', 'Zvksh', 'Zvkb', and 'Zvkt')
94 // CHECK-NEXT: zvksc 1.0 'Zvksc' (shorthand for 'Zvks' and 'Zvbc')
95 // CHECK-NEXT: zvksed 1.0 'Zvksed' (SM4 Block Cipher Instructions)
96 // CHECK-NEXT: zvksg 1.0 'Zvksg' (shorthand for 'Zvks' and 'Zvkg')
97 // CHECK-NEXT: zvksh 1.0 'Zvksh' (SM3 Hash Function Instructions)
98 // CHECK-NEXT: zvkt 1.0 'Zvkt' (Vector Data-Independent Execution Latency)
99 // CHECK-NEXT: zvl1024b 1.0 'Zvl1024b' (Minimum Vector Length 1024)
100 // CHECK-NEXT: zvl128b 1.0 'Zvl128b' (Minimum Vector Length 128)
101 // CHECK-NEXT: zvl16384b 1.0 'Zvl16384b' (Minimum Vector Length 16384)
102 // CHECK-NEXT: zvl2048b 1.0 'Zvl2048b' (Minimum Vector Length 2048)
103 // CHECK-NEXT: zvl256b 1.0 'Zvl256b' (Minimum Vector Length 256)
104 // CHECK-NEXT: zvl32768b 1.0 'Zvl32768b' (Minimum Vector Length 32768)
105 // CHECK-NEXT: zvl32b 1.0 'Zvl32b' (Minimum Vector Length 32)
106 // CHECK-NEXT: zvl4096b 1.0 'Zvl4096b' (Minimum Vector Length 4096)
107 // CHECK-NEXT: zvl512b 1.0 'Zvl512b' (Minimum Vector Length 512)
108 // CHECK-NEXT: zvl64b 1.0 'Zvl64b' (Minimum Vector Length 64)
109 // CHECK-NEXT: zvl65536b 1.0 'Zvl65536b' (Minimum Vector Length 65536)
110 // CHECK-NEXT: zvl8192b 1.0 'Zvl8192b' (Minimum Vector Length 8192)
111 // CHECK-NEXT: zhinx 1.0 'Zhinx' (Half Float in Integer)
112 // CHECK-NEXT: zhinxmin 1.0 'Zhinxmin' (Half Float in Integer Minimal)
113 // CHECK-NEXT: sha 1.0 'Sha' (Augmented Hypervisor)
114 // CHECK-NEXT: shcounterenw 1.0 'Shcounterenw' (Support writeable hcounteren enable bit for any hpmcounter that is not read-only zero)
115 // CHECK-NEXT: shgatpa 1.0 'Shgatpa' (SvNNx4 mode supported for all modes supported by satp, as well as Bare)
116 // CHECK-NEXT: shtvala 1.0 'Shtvala' (htval provides all needed values)
117 // CHECK-NEXT: shvsatpa 1.0 'Shvsatpa' (vsatp supports all modes supported by satp)
118 // CHECK-NEXT: shvstvala 1.0 'Shvstvala' (vstval provides all needed values)
119 // CHECK-NEXT: shvstvecd 1.0 'Shvstvecd' (vstvec supports Direct mode)
120 // CHECK-NEXT: smaia 1.0 'Smaia' (Advanced Interrupt Architecture Machine Level)
121 // CHECK-NEXT: smcdeleg 1.0 'Smcdeleg' (Counter Delegation Machine Level)
122 // CHECK-NEXT: smcsrind 1.0 'Smcsrind' (Indirect CSR Access Machine Level)
123 // CHECK-NEXT: smdbltrp 1.0 'Smdbltrp' (Double Trap Machine Level)
124 // CHECK-NEXT: smepmp 1.0 'Smepmp' (Enhanced Physical Memory Protection)
125 // CHECK-NEXT: smmpm 1.0 'Smmpm' (Machine-level Pointer Masking for M-mode)
126 // CHECK-NEXT: smnpm 1.0 'Smnpm' (Machine-level Pointer Masking for next lower privilege mode)
127 // CHECK-NEXT: smrnmi 1.0 'Smrnmi' (Resumable Non-Maskable Interrupts)
128 // CHECK-NEXT: smstateen 1.0 'Smstateen' (Machine-mode view of the state-enable extension)
129 // CHECK-NEXT: ssaia 1.0 'Ssaia' (Advanced Interrupt Architecture Supervisor Level)
130 // CHECK-NEXT: ssccfg 1.0 'Ssccfg' (Counter Configuration Supervisor Level)
131 // CHECK-NEXT: ssccptr 1.0 'Ssccptr' (Main memory supports page table reads)
132 // CHECK-NEXT: sscofpmf 1.0 'Sscofpmf' (Count Overflow and Mode-Based Filtering)
133 // CHECK-NEXT: sscounterenw 1.0 'Sscounterenw' (Support writeable scounteren enable bit for any hpmcounter that is not read-only zero)
134 // CHECK-NEXT: sscsrind 1.0 'Sscsrind' (Indirect CSR Access Supervisor Level)
135 // CHECK-NEXT: ssdbltrp 1.0 'Ssdbltrp' (Double Trap Supervisor Level)
136 // CHECK-NEXT: ssnpm 1.0 'Ssnpm' (Supervisor-level Pointer Masking for next lower privilege mode)
137 // CHECK-NEXT: sspm 1.0 'Sspm' (Indicates Supervisor-mode Pointer Masking)
138 // CHECK-NEXT: ssqosid 1.0 'Ssqosid' (Quality-of-Service (QoS) Identifiers)
139 // CHECK-NEXT: ssstateen 1.0 'Ssstateen' (Supervisor-mode view of the state-enable extension)
140 // CHECK-NEXT: ssstrict 1.0 'Ssstrict' (No non-conforming extensions are present)
141 // CHECK-NEXT: sstc 1.0 'Sstc' (Supervisor-mode timer interrupts)
142 // CHECK-NEXT: sstvala 1.0 'Sstvala' (stval provides all needed values)
143 // CHECK-NEXT: sstvecd 1.0 'Sstvecd' (stvec supports Direct mode)
144 // CHECK-NEXT: ssu64xl 1.0 'Ssu64xl' (UXLEN=64 supported)
145 // CHECK-NEXT: supm 1.0 'Supm' (Indicates User-mode Pointer Masking)
146 // CHECK-NEXT: svade 1.0 'Svade' (Raise exceptions on improper A/D bits)
147 // CHECK-NEXT: svadu 1.0 'Svadu' (Hardware A/D updates)
148 // CHECK-NEXT: svbare 1.0 'Svbare' (satp mode Bare supported)
149 // CHECK-NEXT: svinval 1.0 'Svinval' (Fine-Grained Address-Translation Cache Invalidation)
150 // CHECK-NEXT: svnapot 1.0 'Svnapot' (NAPOT Translation Contiguity)
151 // CHECK-NEXT: svpbmt 1.0 'Svpbmt' (Page-Based Memory Types)
152 // CHECK-NEXT: svvptc 1.0 'Svvptc' (Obviating Memory-Management Instructions after Marking PTEs Valid)
153 // CHECK-NEXT: xcvalu 1.0 'XCValu' (CORE-V ALU Operations)
154 // CHECK-NEXT: xcvbi 1.0 'XCVbi' (CORE-V Immediate Branching)
155 // CHECK-NEXT: xcvbitmanip 1.0 'XCVbitmanip' (CORE-V Bit Manipulation)
156 // CHECK-NEXT: xcvelw 1.0 'XCVelw' (CORE-V Event Load Word)
157 // CHECK-NEXT: xcvmac 1.0 'XCVmac' (CORE-V Multiply-Accumulate)
158 // CHECK-NEXT: xcvmem 1.0 'XCVmem' (CORE-V Post-incrementing Load & Store)
159 // CHECK-NEXT: xcvsimd 1.0 'XCVsimd' (CORE-V SIMD ALU)
160 // CHECK-NEXT: xsfcease 1.0 'XSfcease' (SiFive sf.cease Instruction)
161 // CHECK-NEXT: xsfvcp 1.0 'XSfvcp' (SiFive Custom Vector Coprocessor Interface Instructions)
162 // CHECK-NEXT: xsfvfnrclipxfqf 1.0 'XSfvfnrclipxfqf' (SiFive FP32-to-int8 Ranged Clip Instructions)
163 // CHECK-NEXT: xsfvfwmaccqqq 1.0 'XSfvfwmaccqqq' (SiFive Matrix Multiply Accumulate Instruction and 4-by-4))
164 // CHECK-NEXT: xsfvqmaccdod 1.0 'XSfvqmaccdod' (SiFive Int8 Matrix Multiplication Instructions (2-by-8 and 8-by-2))
165 // CHECK-NEXT: xsfvqmaccqoq 1.0 'XSfvqmaccqoq' (SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4))
166 // CHECK-NEXT: xsifivecdiscarddlone 1.0 'XSiFivecdiscarddlone' (SiFive sf.cdiscard.d.l1 Instruction)
167 // CHECK-NEXT: xsifivecflushdlone 1.0 'XSiFivecflushdlone' (SiFive sf.cflush.d.l1 Instruction)
168 // CHECK-NEXT: xtheadba 1.0 'XTHeadBa' (T-Head address calculation instructions)
169 // CHECK-NEXT: xtheadbb 1.0 'XTHeadBb' (T-Head basic bit-manipulation instructions)
170 // CHECK-NEXT: xtheadbs 1.0 'XTHeadBs' (T-Head single-bit instructions)
171 // CHECK-NEXT: xtheadcmo 1.0 'XTHeadCmo' (T-Head cache management instructions)
172 // CHECK-NEXT: xtheadcondmov 1.0 'XTHeadCondMov' (T-Head conditional move instructions)
173 // CHECK-NEXT: xtheadfmemidx 1.0 'XTHeadFMemIdx' (T-Head FP Indexed Memory Operations)
174 // CHECK-NEXT: xtheadmac 1.0 'XTHeadMac' (T-Head Multiply-Accumulate Instructions)
175 // CHECK-NEXT: xtheadmemidx 1.0 'XTHeadMemIdx' (T-Head Indexed Memory Operations)
176 // CHECK-NEXT: xtheadmempair 1.0 'XTHeadMemPair' (T-Head two-GPR Memory Operations)
177 // CHECK-NEXT: xtheadsync 1.0 'XTHeadSync' (T-Head multicore synchronization instructions)
178 // CHECK-NEXT: xtheadvdot 1.0 'XTHeadVdot' (T-Head Vector Extensions for Dot)
179 // CHECK-NEXT: xventanacondops 1.0 'XVentanaCondOps' (Ventana Conditional Ops)
180 // CHECK-NEXT: xwchc 2.2 'Xwchc' (WCH/QingKe additional compressed opcodes)
181 // CHECK-EMPTY:
182 // CHECK-NEXT: Experimental extensions
183 // CHECK-NEXT: zicfilp 1.0 'Zicfilp' (Landing pad)
184 // CHECK-NEXT: zicfiss 1.0 'Zicfiss' (Shadow stack)
185 // CHECK-NEXT: zalasr 0.1 'Zalasr' (Load-Acquire and Store-Release Instructions)
186 // CHECK-NEXT: zvbc32e 0.7 'Zvbc32e' (Vector Carryless Multiplication with 32-bits elements)
187 // CHECK-NEXT: zvkgs 0.7 'Zvkgs' (Vector-Scalar GCM instructions for Cryptography)
188 // CHECK-NEXT: sdext 1.0 'Sdext' (External debugger)
189 // CHECK-NEXT: sdtrig 1.0 'Sdtrig' (Debugger triggers)
190 // CHECK-NEXT: smctr 1.0 'Smctr' (Control Transfer Records Machine Level)
191 // CHECK-NEXT: ssctr 1.0 'Ssctr' (Control Transfer Records Supervisor Level)
192 // CHECK-NEXT: svukte 0.3 'Svukte' (Address-Independent Latency of User-Mode Faults to Supervisor Addresses)
193 // CHECK-NEXT: xqcia 0.2 'Xqcia' (Qualcomm uC Arithmetic Extension)
194 // CHECK-NEXT: xqciac 0.2 'Xqciac' (Qualcomm uC Load-Store Address Calculation Extension)
195 // CHECK-NEXT: xqcicli 0.2 'Xqcicli' (Qualcomm uC Conditional Load Immediate Extension)
196 // CHECK-NEXT: xqcicm 0.2 'Xqcicm' (Qualcomm uC Conditional Move Extension)
197 // CHECK-NEXT: xqcics 0.2 'Xqcics' (Qualcomm uC Conditional Select Extension)
198 // CHECK-NEXT: xqcicsr 0.2 'Xqcicsr' (Qualcomm uC CSR Extension)
199 // CHECK-NEXT: xqciint 0.2 'Xqciint' (Qualcomm uC Interrupts Extension)
200 // CHECK-NEXT: xqcilo 0.2 'Xqcilo' (Qualcomm uC Large Offset Load Store Extension)
201 // CHECK-NEXT: xqcilsm 0.2 'Xqcilsm' (Qualcomm uC Load Store Multiple Extension)
202 // CHECK-NEXT: xqcisls 0.2 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
203 // CHECK-EMPTY:
204 // CHECK-NEXT: Supported Profiles
205 // CHECK-NEXT: rva20s64
206 // CHECK-NEXT: rva20u64
207 // CHECK-NEXT: rva22s64
208 // CHECK-NEXT: rva22u64
209 // CHECK-NEXT: rva23s64
210 // CHECK-NEXT: rva23u64
211 // CHECK-NEXT: rvb23s64
212 // CHECK-NEXT: rvb23u64
213 // CHECK-NEXT: rvi20u32
214 // CHECK-NEXT: rvi20u64
215 // CHECK-EMPTY:
216 // CHECK-NEXT: Experimental Profiles
217 // CHECK-NEXT: rvm23u32
218 // CHECK-EMPTY:
219 // CHECK-NEXT: Use -march to specify the target's extension.
220 // CHECK-NEXT: For example, clang -march=rv32i_v1p0