549 lines · c
1// RUN: %clang --target=riscv32-unknown-elf -march=rv32i -### %s \2// RUN: -fsyntax-only 2>&1 | FileCheck %s3// RUN: %clang --target=riscv32-unknown-elf -march=rv32i2p1 -### %s \4// RUN: -fsyntax-only 2>&1 | FileCheck %s5// RUN: %clang --target=riscv32-unknown-elf -march=rv32im -### %s \6// RUN: -fsyntax-only 2>&1 | FileCheck %s7// RUN: %clang --target=riscv32-unknown-elf -march=rv32ima -### %s \8// RUN: -fsyntax-only 2>&1 | FileCheck %s9// RUN: %clang --target=riscv32-unknown-elf -march=rv32imaf -### %s \10// RUN: -fsyntax-only 2>&1 | FileCheck %s11// RUN: %clang --target=riscv32-unknown-elf -march=rv32imafd -### %s \12// RUN: -fsyntax-only 2>&1 | FileCheck %s13// RUN: %clang --target=riscv32-unknown-elf -march=rv32imafdq -### %s \14// RUN: -fsyntax-only 2>&1 | FileCheck %s15 16// RUN: %clang --target=riscv32-unknown-elf -march=rv32ic -### %s \17// RUN: -fsyntax-only 2>&1 | FileCheck %s18// RUN: %clang --target=riscv32-unknown-elf -march=rv32imc -### %s \19// RUN: -fsyntax-only 2>&1 | FileCheck %s20// RUN: %clang --target=riscv32-unknown-elf -march=rv32imac -### %s \21// RUN: -fsyntax-only 2>&1 | FileCheck %s22// RUN: %clang --target=riscv32-unknown-elf -march=rv32imafc -### %s \23// RUN: -fsyntax-only 2>&1 | FileCheck %s24// RUN: %clang --target=riscv32-unknown-elf -march=rv32imafdc -### %s \25// RUN: -fsyntax-only 2>&1 | FileCheck %s26// RUN: %clang --target=riscv32-unknown-elf -march=rv32imafdqc -### %s \27// RUN: -fsyntax-only 2>&1 | FileCheck %s28 29// RUN: %clang --target=riscv32-unknown-elf -march=rv32ia -### %s \30// RUN: -fsyntax-only 2>&1 | FileCheck %s31// RUN: %clang --target=riscv32-unknown-elf -march=rv32iaf -### %s \32// RUN: -fsyntax-only 2>&1 | FileCheck %s33// RUN: %clang --target=riscv32-unknown-elf -march=rv32iafd -### %s \34// RUN: -fsyntax-only 2>&1 | FileCheck %s35// RUN: %clang --target=riscv32-unknown-elf -march=rv32iafdq -### %s \36// RUN: -fsyntax-only 2>&1 | FileCheck %s37 38// RUN: %clang --target=riscv32-unknown-elf -march=rv32iac -### %s \39// RUN: -fsyntax-only 2>&1 | FileCheck %s40// RUN: %clang --target=riscv32-unknown-elf -march=rv32iafc -### %s \41// RUN: -fsyntax-only 2>&1 | FileCheck %s42// RUN: %clang --target=riscv32-unknown-elf -march=rv32iafdc -### %s \43// RUN: -fsyntax-only 2>&1 | FileCheck %s44// RUN: %clang --target=riscv32-unknown-elf -march=rv32iafdqc -### %s \45// RUN: -fsyntax-only 2>&1 | FileCheck %s46 47// RUN: %clang --target=riscv32-unknown-elf -march=rv32g -### %s \48// RUN: -fsyntax-only 2>&1 | FileCheck %s49// RUN: %clang --target=riscv32-unknown-elf -march=rv32gc -### %s \50// RUN: -fsyntax-only 2>&1 | FileCheck %s51 52// RUN: %clang --target=riscv32-unknown-elf -mabi=ilp32 -### %s \53// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-ILP32 %s54 55// CHECK-ILP32: "-target-feature" "+m"56// CHECK-ILP32-SAME: {{^}} "-target-feature" "+a"57// CHECK-ILP32-SAME: {{^}} "-target-feature" "+f"58// CHECK-ILP32-SAME: {{^}} "-target-feature" "+d"59// CHECK-ILP32-SAME: {{^}} "-target-feature" "+c"60 61// RUN: %clang --target=riscv32-unknown-elf -mabi=ilp32f -### %s \62// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-ILP32F %s63 64// CHECK-ILP32F: "-target-feature" "+m"65// CHECK-ILP32F-SAME: {{^}} "-target-feature" "+a"66// CHECK-ILP32F-SAME: {{^}} "-target-feature" "+f"67// CHECK-ILP32F-SAME: {{^}} "-target-feature" "+d"68// CHECK-ILP32F-SAME: {{^}} "-target-feature" "+c"69 70// RUN: %clang --target=riscv32-unknown-elf -mabi=ilp32d -### %s \71// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-ILP32D %s72 73// CHECK-ILP32D: "-target-feature" "+m"74// CHECK-ILP32D-SAME: {{^}} "-target-feature" "+a"75// CHECK-ILP32D-SAME: {{^}} "-target-feature" "+f"76// CHECK-ILP32D-SAME: {{^}} "-target-feature" "+d"77// CHECK-ILP32D-SAME: {{^}} "-target-feature" "+c"78 79// RUN: %clang --target=riscv64-unknown-elf -march=rv64i -### %s \80// RUN: -fsyntax-only 2>&1 | FileCheck %s81// RUN: %clang --target=riscv64-unknown-elf -march=rv64i2p1 -### %s \82// RUN: -fsyntax-only 2>&1 | FileCheck %s83// RUN: %clang --target=riscv64-unknown-elf -march=rv64im -### %s \84// RUN: -fsyntax-only 2>&1 | FileCheck %s85// RUN: %clang --target=riscv64-unknown-elf -march=rv64ima -### %s \86// RUN: -fsyntax-only 2>&1 | FileCheck %s87// RUN: %clang --target=riscv64-unknown-elf -march=rv64imaf -### %s \88// RUN: -fsyntax-only 2>&1 | FileCheck %s89// RUN: %clang --target=riscv64-unknown-elf -march=rv64imafd -### %s \90// RUN: -fsyntax-only 2>&1 | FileCheck %s91// RUN: %clang --target=riscv64-unknown-elf -march=rv64imafdq -### %s \92// RUN: -fsyntax-only 2>&1 | FileCheck %s93 94// RUN: %clang --target=riscv64-unknown-elf -march=rv64ic -### %s \95// RUN: -fsyntax-only 2>&1 | FileCheck %s96// RUN: %clang --target=riscv64-unknown-elf -march=rv64imc -### %s \97// RUN: -fsyntax-only 2>&1 | FileCheck %s98// RUN: %clang --target=riscv64-unknown-elf -march=rv64imac -### %s \99// RUN: -fsyntax-only 2>&1 | FileCheck %s100// RUN: %clang --target=riscv64-unknown-elf -march=rv64imafc -### %s \101// RUN: -fsyntax-only 2>&1 | FileCheck %s102// RUN: %clang --target=riscv64-unknown-elf -march=rv64imafdc -### %s \103// RUN: -fsyntax-only 2>&1 | FileCheck %s104// RUN: %clang --target=riscv64-unknown-elf -march=rv64imafdqc -### %s \105// RUN: -fsyntax-only 2>&1 | FileCheck %s106 107// RUN: %clang --target=riscv64-unknown-elf -march=rv64ia -### %s \108// RUN: -fsyntax-only 2>&1 | FileCheck %s109// RUN: %clang --target=riscv64-unknown-elf -march=rv64iaf -### %s \110// RUN: -fsyntax-only 2>&1 | FileCheck %s111// RUN: %clang --target=riscv64-unknown-elf -march=rv64iafd -### %s \112// RUN: -fsyntax-only 2>&1 | FileCheck %s113// RUN: %clang --target=riscv64-unknown-elf -march=rv64iafdq -### %s \114// RUN: -fsyntax-only 2>&1 | FileCheck %s115 116// RUN: %clang --target=riscv64-unknown-elf -march=rv64iac -### %s \117// RUN: -fsyntax-only 2>&1 | FileCheck %s118// RUN: %clang --target=riscv64-unknown-elf -march=rv64iafc -### %s \119// RUN: -fsyntax-only 2>&1 | FileCheck %s120// RUN: %clang --target=riscv64-unknown-elf -march=rv64iafdc -### %s \121// RUN: -fsyntax-only 2>&1 | FileCheck %s122// RUN: %clang --target=riscv64-unknown-elf -march=rv64iafdqc -### %s \123// RUN: -fsyntax-only 2>&1 | FileCheck %s124 125// RUN: %clang --target=riscv64-unknown-elf -march=rv64g -### %s \126// RUN: -fsyntax-only 2>&1 | FileCheck %s127// RUN: %clang --target=riscv64-unknown-elf -march=rv64gc -### %s \128// RUN: -fsyntax-only 2>&1 | FileCheck %s129 130// RUN: %clang --target=riscv64-unknown-elf -mabi=lp64 -### %s \131// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-LP64 %s132 133// CHECK-LP64: "-target-feature" "+m"134// CHECK-LP64-SAME: {{^}} "-target-feature" "+a"135// CHECK-LP64-SAME: {{^}} "-target-feature" "+f"136// CHECK-LP64-SAME: {{^}} "-target-feature" "+d"137// CHECK-LP64-SAME: {{^}} "-target-feature" "+c"138 139// RUN: %clang --target=riscv64-unknown-elf -mabi=lp64f -### %s \140// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-LP64F %s141 142// CHECK-LP64F: "-target-feature" "+m"143// CHECK-LP64F-SAME: {{^}} "-target-feature" "+a"144// CHECK-LP64F-SAME: {{^}} "-target-feature" "+f"145// CHECK-LP64F-SAME: {{^}} "-target-feature" "+d"146// CHECK-LP64F-SAME: {{^}} "-target-feature" "+c"147 148// RUN: %clang --target=riscv64-unknown-elf -mabi=lp64d -### %s \149// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-LP64D %s150 151// CHECK-LP64D: "-target-feature" "+m"152// CHECK-LP64D-SAME: {{^}} "-target-feature" "+a"153// CHECK-LP64D-SAME: {{^}} "-target-feature" "+f"154// CHECK-LP64D-SAME: {{^}} "-target-feature" "+d"155// CHECK-LP64D-SAME: {{^}} "-target-feature" "+c"156 157// CHECK-NOT: error: invalid arch name '158 159// RUN: not %clang --target=riscv32-unknown-elf -march=rv32 -### %s \160// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32 %s161// RV32: error: invalid arch name 'rv32'162 163// RUN: not %clang --target=riscv32-unknown-elf -march=rv32m -### %s \164// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32M %s165// RV32M: error: invalid arch name 'rv32m'166 167// RUN: %clang --target=riscv32-unknown-elf -march=rv32id -### %s \168// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32ID %s169// RV32ID: "-target-feature" "+f" "-target-feature" "+d"170 171// RUN: not %clang --target=riscv32-unknown-elf -march=rv32l -### %s \172// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32L %s173// RV32L: error: invalid arch name 'rv32l'174 175// RUN: %clang --target=riscv32-unknown-elf -march=rv32imadf -### %s \176// RUN: -fsyntax-only 2>&1 | FileCheck %s177 178// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imm -### %s \179// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32IMM %s180// RV32IMM: error: invalid arch name 'rv32imm'181 182// RUN: not %clang --target=riscv32-unknown-elf -march=RV32I -### %s \183// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32I-UPPER %s184// RV32I-UPPER: error: invalid arch name 'RV32I'185 186// RUN: not %clang --target=riscv64-unknown-elf -march=rv64 -### %s \187// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64 %s188// RV64: error: invalid arch name 'rv64'189 190// RUN: not %clang --target=riscv64-unknown-elf -march=rv64m -### %s \191// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64M %s192// RV64M: error: invalid arch name 'rv64m'193 194// RUN: %clang --target=riscv64-unknown-elf -march=rv64id -### %s \195// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64ID %s196// RV64ID: "-target-feature" "+f" "-target-feature" "+d"197 198// RUN: not %clang --target=riscv64-unknown-elf -march=rv64l -### %s \199// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64L %s200// RV64L: error: invalid arch name 'rv64l'201 202// RUN: %clang --target=riscv64-unknown-elf -march=rv64imadf -### %s \203// RUN: -fsyntax-only 2>&1 | FileCheck %s204 205// RUN: not %clang --target=riscv64-unknown-elf -march=rv64imm -### %s \206// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64IMM %s207// RV64IMM: error: invalid arch name 'rv64imm'208 209// RUN: not %clang --target=riscv64-unknown-elf -march=RV64I -### %s \210// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64I-UPPER %s211// RV64I-UPPER: error: invalid arch name 'RV64I'212 213// Testing specific messages and unsupported extensions.214 215// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imC -### %s \216// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-LOWER %s217// RV32-LOWER: error: invalid arch name 'rv32imC',218// RV32-LOWER: string may only contain [a-z0-9_]219 220// RUN: not %clang --target=riscv32-unknown-elf -march=unknown -### %s \221// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-STR %s222// RV32-STR: error: invalid arch name 'unknown',223// RV32-STR: string must begin with rv32{i,e,g}, rv64{i,e,g}, or a supported profile name224 225// RUN: not %clang --target=riscv32-unknown-elf -march=rv32q -### %s \226// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-LETTER %s227// RV32-LETTER: error: invalid arch name 'rv32q',228// RV32-LETTER: first letter after 'rv32' should be 'e', 'i' or 'g'229 230// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izvl64b -### %s \231// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZVL64B-ER %s232// RV32-ZVL64B-ER: error: invalid arch name 'rv32izvl64b',233// RV32-ZVL64B-ER: 'zvl*b' requires 'v' or 'zve*' extension to also be specified234 235// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imw -### %s \236// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-STD-INVAL %s237// RV32-STD-INVAL: error: invalid arch name 'rv32imw',238// RV32-STD-INVAL: invalid standard user-level extension 'w'239 240// RUN: not %clang --target=riscv32-unknown-elf -march=rv32xabc -### %s \241// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X %s242// RV32X: error: invalid arch name 'rv32xabc',243// RV32X: first letter after 'rv32' should be 'e', 'i' or 'g'244 245// RUN: not %clang --target=riscv32-unknown-elf -march=rv32sabc -### %s \246// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32S %s247// RV32S: error: invalid arch name 'rv32sabc',248// RV32S: first letter after 'rv32' should be 'e', 'i' or 'g'249 250// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ix -### %s \251// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X-NAME %s252// RV32X-NAME: error: invalid arch name 'rv32ix',253// RV32X-NAME: non-standard user-level extension name missing after 'x'254 255// RUN: not %clang --target=riscv32-unknown-elf -march=rv32is -### %s \256// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32S-NAME %s257// RV32S-NAME: error: invalid arch name 'rv32is',258// RV32S-NAME: standard supervisor-level extension259// RV32S-NAME: name missing after 's'260 261// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ix_s -### %s \262// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32ALL-NAME %s263// RV32ALL-NAME: error: invalid arch name 'rv32ix_s',264// RV32ALL-NAME: non-standard user-level extension265// RV32ALL-NAME: name missing after 'x'266 267// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc -### %s \268// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X-UNS %s269// RV32X-UNS: error: invalid arch name 'rv32ixabc',270// RV32X-UNS: unsupported non-standard user-level extension 'xabc'271 272// RUN: not %clang --target=riscv32-unknown-elf -march=rv32isa -### %s \273// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32S-UNS %s274// RV32S-UNS: error: invalid arch name 'rv32isa',275// RV32S-UNS: unsupported standard supervisor-level extension 'sa'276 277// RUN: not %clang --target=riscv32-unknown-elf -march=rv32isp_xabc -### %s \278// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32ALL %s279// RV32ALL: error: invalid arch name 'rv32isp_xabc',280// RV32ALL: unsupported standard supervisor-level extension 'sp'281 282// RUN: not %clang --target=riscv32-unknown-elf -march=rv32i20 -### %s \283// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-IVER %s284// RV32-IVER: error: invalid arch name 'rv32i20', unsupported285// RV32-IVER: version number 20 for extension 'i'286 287// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imc5 -### %s \288// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-CVER %s289// RV32-CVER: error: invalid arch name 'rv32imc5', unsupported290// RV32-CVER: version number 5 for extension 'c'291 292// RUN: not %clang --target=riscv32-unknown-elf -march=rv32i2p -### %s \293// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-IMINOR-MISS %s294// RV32-IMINOR-MISS: error: invalid arch name 'rv32i2p',295// RV32-IMINOR-MISS: minor version number missing after 'p' for extension 'i'296 297// RUN: not %clang --target=riscv32-unknown-elf -march=rv32i2p2 -### %s \298// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-IMINOR1 %s299// RV32-IMINOR1: error: invalid arch name 'rv32i2p2', unsupported300// RV32-IMINOR1: version number 2.2 for extension 'i'301 302// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixt2p -### %s \303// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XMINOR-MISS %s304// RV32-XMINOR-MISS: error: invalid arch name 'rv32ixt2p',305// RV32-XMINOR-MISS: minor version number missing after 'p' for extension 'xt'306 307// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ist2p0 -### %s \308// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-SMINOR0 %s309// RV32-SMINOR0: error: invalid arch name 'rv32ist2p0',310// RV32-SMINOR0: unsupported standard supervisor-level extension 'st'311 312// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc_ -### %s \313// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XSEP %s314// RV32-XSEP: error: invalid arch name 'rv32ixabc_',315// RV32-XSEP: unsupported non-standard user-level extension 'xabc'316 317// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc_a -### %s \318// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-PREFIX %s319// RV32-PREFIX: error: invalid arch name 'rv32ixabc_a',320// RV32-PREFIX: unsupported non-standard user-level extension 'xabc'321 322// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixdef_sabc -### %s \323// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-X-ORDER %s324// RV32-X-ORDER: error: invalid arch name 'rv32ixdef_sabc',325// RV32-X-ORDER unsupported non-standard user-level extension 'xdef'326 327// RUN: not %clang --target=riscv32-unknown-elf -march=rv32im_m -### %s \328// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XDUP %s329// RV32-XDUP: error: invalid arch name 'rv32im_m',330// RV32-XDUP: duplicated standard user-level extension 'm'331 332// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc_xdef -### %s \333// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-X-X-INVAL %s334// RV32-X-X-INVAL: error: invalid arch name 'rv32ixabc_xdef', unsupported335// RV32-X-X-INVAL: non-standard user-level extension 'xabc'336 337// RUN: not %clang --target=riscv32-unknown-elf -march=rv32isdef_xabc -### %s \338// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-X-S-INVAL %s339// RV32-X-S-INVAL: error: invalid arch name 'rv32isdef_xabc',340// RV32-X-S-INVAL: unsupported standard supervisor-level extension 'sdef'341 342// RUN: %clang --target=riscv32-unknown-elf -march=rv32i -### %s \343// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-TARGET %s344// RUN: %clang --target=riscv64-unknown-elf -march=rv32i -### %s \345// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-TARGET %s346// RUN: %clang --target=riscv32-unknown-elf -mcpu=generic-rv32 -### %s \347// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-TARGET %s348// RUN: %clang --target=riscv64-unknown-elf -mcpu=generic-rv32 -### %s \349// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-TARGET %s350// RV32-TARGET: "-triple" "riscv32-unknown-unknown-elf"351 352// RUN: %clang --target=riscv32-unknown-elf -march=rv64i -### %s \353// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64-TARGET %s354// RUN: %clang --target=riscv64-unknown-elf -march=rv64i -### %s \355// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64-TARGET %s356// RUN: %clang --target=riscv32-unknown-elf -mcpu=generic-rv64 -### %s \357// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64-TARGET %s358// RUN: %clang --target=riscv64-unknown-elf -mcpu=generic-rv64 -### %s \359// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64-TARGET %s360// RV64-TARGET: "-triple" "riscv64-unknown-unknown-elf"361 362// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfh01p0 -### %s \363// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFH %s364// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfh -### %s \365// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFH %s366// RV32-ZFH: "-target-feature" "+zfh"367 368// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfhmin01p0 -### %s \369// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFHMIN %s370// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfhmin -### %s \371// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFHMIN %s372// RV32-ZFHMIN: "-target-feature" "+zfhmin"373 374// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izalasr -### %s \375// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-NOFLAG %s376// RV32-EXPERIMENTAL-NOFLAG: error: invalid arch name 'rv32izalasr'377// RV32-EXPERIMENTAL-NOFLAG: requires '-menable-experimental-extensions'378 379// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izalasr -menable-experimental-extensions -### %s \380// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-NOVERS %s381// RV32-EXPERIMENTAL-NOVERS: error: invalid arch name 'rv32izalasr'382// RV32-EXPERIMENTAL-NOVERS: experimental extension requires explicit version number383 384// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izalasr0p7 -menable-experimental-extensions -### %s \385// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-BADVERS %s386// RV32-EXPERIMENTAL-BADVERS: error: invalid arch name 'rv32izalasr0p7'387// RV32-EXPERIMENTAL-BADVERS: unsupported version number 0.7 for experimental extension 'zalasr' (this compiler supports 0.9)388 389// RUN: %clang --target=riscv32-unknown-elf -march=rv32izalasr0p9 -menable-experimental-extensions -### %s \390// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-GOODVERS %s391// RV32-EXPERIMENTAL-GOODVERS: "-target-feature" "+experimental-zalasr"392 393// RUN: %clang --target=riscv32-unknown-elf -march=rv32iztso1p0 -### %s \394// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZTSO %s395// RUN: %clang --target=riscv32-unknown-elf -march=rv32iztso -### %s \396// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZTSO %s397// RV32-ZTSO: "-target-feature" "+ztso"398 399// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbb1p0 -### %s \400// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBB %s401// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbb -### %s \402// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBB %s403// RV32-ZBB: "-target-feature" "+zbb"404 405// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izbb1p0zbs1p0 -menable-experimental-extensions -### %s \406// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-ZBB-ZBS-UNDERSCORE %s407// RV32-EXPERIMENTAL-ZBB-ZBS-UNDERSCORE: error: invalid arch name 'rv32izbb1p0zbs1p0', unsupported standard user-level extension 'zbb1p0zbs'408 409// RUN: %clang --target=riscv32-unknown-elf -march=rv32izba1p0 -### %s \410// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBA %s411// RUN: %clang --target=riscv32-unknown-elf -march=rv32izba -### %s \412// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBA %s413// RV32-ZBA: "-target-feature" "+zba"414 415// RUN: not %clang --target=riscv32-unknown-elf -march=rv32iv0p1 -### %s -c 2>&1 | \416// RUN: FileCheck -check-prefix=RV32-V-BADVERS %s417// RV32-V-BADVERS: error: invalid arch name 'rv32iv0p1'418// RV32-V-BADVERS: unsupported version number 0.1 for extension 'v'419 420// RUN: %clang --target=riscv32-unknown-elf -march=rv32iv1p0 -### %s -c 2>&1 | \421// RUN: FileCheck -check-prefix=RV32-V-GOODVERS %s422// RV32-V-GOODVERS: "-target-feature" "+v"423 424// RUN: not %clang --target=riscv32-unknown-elf -march=rv32iv1p0_zvl32b0p1 -### %s -c 2>&1 | \425// RUN: FileCheck -check-prefix=RV32-ZVL-BADVERS %s426// RV32-ZVL-BADVERS: error: invalid arch name 'rv32iv1p0_zvl32b0p1'427// RV32-ZVL-BADVERS: unsupported version number 0.1 for extension 'zvl32b'428 429// RUN: %clang --target=riscv32-unknown-elf -march=rv32iv1p0_zvl32b1p0 -### %s -c 2>&1 | \430// RUN: FileCheck -check-prefix=RV32-ZVL-GOODVERS %s431// RV32-ZVL-GOODVERS: "-target-feature" "+zvl32b"432 433// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbkc1p0 -### %s \434// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBKC %s435// RV32-ZBKC: "-target-feature" "+zbkc"436 437// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbkx1p0 -### %s \438// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBKX %s439// RV32-ZBKX: "-target-feature" "+zbkx"440 441// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbkb1p0 -### %s \442// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBKB %s443// RV32-ZBKB: "-target-feature" "+zbkb"444 445// RUN: %clang --target=riscv32-unknown-elf -march=rv32izknd1p0 -### %s \446// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKND %s447// RV32-ZKND: "-target-feature" "+zknd"448 449// RUN: %clang --target=riscv32-unknown-elf -march=rv32izkne1p0 -### %s \450// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKNE %s451// RV32-ZKNE: "-target-feature" "+zkne"452 453// RUN: %clang --target=riscv32-unknown-elf -march=rv32izknh1p0 -### %s \454// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKNH %s455// RV32-ZKNH: "-target-feature" "+zknh"456 457// RUN: %clang --target=riscv32-unknown-elf -march=rv32izksed1p0 -### %s \458// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKSED %s459// RV32-ZKSED: "-target-feature" "+zksed"460 461// RUN: %clang --target=riscv32-unknown-elf -march=rv32izksh1p0 -### %s \462// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKSH %s463// RV32-ZKSH: "-target-feature" "+zksh"464 465// RUN: %clang --target=riscv32-unknown-elf -march=rv32izkr1p0 -### %s \466// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKR %s467// RV32-ZKR: "-target-feature" "+zkr"468 469// RUN: %clang --target=riscv32-unknown-elf -march=rv32izkt1p0 -### %s \470// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZKT %s471// RV32-ZKT: "-target-feature" "+zkt"472 473// RUN: %clang --target=riscv32-unknown-elf -march=rv32izk1p0 -### %s \474// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZK %s475// RV32-ZK: "-target-feature" "+zk"476 477// RUN: %clang --target=riscv32-unknown-elf -march=rv32izfh1p0 -### %s \478// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-RV32-ZFH %s479// CHECK-RV32-ZFH: "-target-feature" "+zfh"480 481// RUN: %clang --target=riscv32-unknown-elf -march=rv32izfhmin1p0 -### %s \482// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-RV32-ZFHMIN %s483// CHECK-RV32-ZFHMIN: "-target-feature" "+zfhmin"484 485// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izve32x0p1 -### %s -c 2>&1 | \486// RUN: FileCheck -check-prefix=RV32-ZVE32X-BADVERS %s487// RV32-ZVE32X-BADVERS: error: invalid arch name 'rv32izve32x0p1'488// RV32-ZVE32X-BADVERS: unsupported version number 0.1 for extension 'zve32x'489 490// RUN: %clang --target=riscv32-unknown-elf -march=rv32izve32x -### %s -c 2>&1 | \491// RUN: FileCheck -check-prefix=RV32-ZVE32X-GOODVERS %s492// RV32-ZVE32X-GOODVERS: "-target-feature" "+zve32x"493 494// RUN: %clang --target=riscv32-unknown-elf -march=rv32izve32f -### %s -c 2>&1 | \495// RUN: FileCheck -check-prefix=RV32-ZVE32F-GOOD %s496// RV32-ZVE32F-GOOD: "-target-feature" "+zve32f"497 498// RUN: %clang --target=riscv32-unknown-elf -march=rv32izve64x -### %s -c 2>&1 | \499// RUN: FileCheck -check-prefix=RV32-ZVE64X %s500// RV32-ZVE64X: "-target-feature" "+zve64x"501 502// RUN: %clang --target=riscv32-unknown-elf -march=rv32izve64f -### %s -c 2>&1 | \503// RUN: FileCheck -check-prefix=RV32-ZVE64F-GOOD %s504// RV32-ZVE64F-GOOD: "-target-feature" "+zve64f"505 506// RUN: %clang --target=riscv32-unknown-elf -march=rv32izve64d -### %s -c 2>&1 | \507// RUN: FileCheck -check-prefix=RV32-ZVE64D-GOOD %s508// RV32-ZVE64D-GOOD: "-target-feature" "+zve64d"509 510// RUN: %clang --target=riscv32-unknown-elf -march=rv32izfinx -### %s \511// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFINX-GOOD %s512// RV32-ZFINX-GOOD: "-target-feature" "+zfinx"513 514// RUN: %clang --target=riscv32-unknown-elf -march=rv32izdinx -### %s \515// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZDINX-GOOD %s516// RV32-ZDINX-GOOD: "-target-feature" "+zdinx"517 518// RUN: %clang --target=riscv32-unknown-elf -march=rv32izhinxmin -### %s \519// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZHINXMIN-GOOD %s520// RV32-ZHINXMIN-GOOD: "-target-feature" "+zhinxmin"521 522// RUN: %clang --target=riscv32-unknown-elf -march=rv32izhinx1p0 -### %s \523// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZHINX-GOOD %s524// RV32-ZHINX-GOOD: "-target-feature" "+zhinx"525 526// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izhinx0p1 -### %s \527// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZHINX-BADVERS %s528// RV32-ZHINX-BADVERS: error: invalid arch name 'rv32izhinx0p1'529// RV32-ZHINX-BADVERS: unsupported version number 0.1 for extension 'zhinx'530 531// RUN: not %clang --target=riscv32-unknown-elf -march=rv32i_zmmul2p0 -### %s \532// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZMMUL-BADVERS %s533// RV32-ZMMUL-BADVERS: error: invalid arch name 'rv32i_zmmul2p0'534// RV32-ZMMUL-BADVERS: unsupported version number 2.0 for extension535 536// RUN: %clang --target=riscv32-unknown-elf -march=rv32i_zmmul1p0 -### %s \537// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZMMUL-GOODVERS %s538// RV32-ZMMUL-GOODVERS: "-target-feature" "+zmmul"539 540// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ifzfinx -### %s \541// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-F-ZFINX-ER %s542// RV32-F-ZFINX-ER: error: invalid arch name 'rv32ifzfinx',543// RV32-F-ZFINX-ER: 'f' and 'zfinx' extensions are incompatible544 545// RUN: not %clang --target=riscv32-unknown-elf -march=rv32idzdinx -### %s \546// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-D-ZDINX-ER %s547// RV32-D-ZDINX-ER: error: invalid arch name 'rv32idzdinx',548// RV32-D-ZFINX-ER: 'f' and 'zfinx' extensions are incompatible549