[X86][MC,LLD][NFC] Rename R_X86_64_REX2_GOTPCRELX (#116737)
[llvm-project.git] / llvm / test / MC / RISCV / target-abi-invalid.s
blobf78b1481b1e48047cb4217124c5536372d694562
1 # RUN: llvm-mc -triple=riscv32 -target-abi foo < %s 2>&1 \
2 # RUN: | FileCheck -check-prefix=RV32I-FOO %s
3 # RUN: llvm-mc -triple=riscv32 -mattr=+f -target-abi ilp32foof < %s 2>&1 \
4 # RUN: | FileCheck -check-prefix=RV32IF-ILP32FOOF %s
6 # RV32I-FOO: 'foo' is not a recognized ABI for this target (ignoring target-abi)
7 # RV32IF-ILP32FOOF: 'ilp32foof' is not a recognized ABI for this target (ignoring target-abi)
9 # RUN: llvm-mc -triple=riscv64 -target-abi ilp32 < %s 2>&1 \
10 # RUN: | FileCheck -check-prefix=RV64I-ILP32 %s
11 # RUN: llvm-mc -triple=riscv64 -mattr=+f -target-abi ilp32f < %s 2>&1 \
12 # RUN: | FileCheck -check-prefix=RV64IF-ILP32F %s
13 # RUN: llvm-mc -triple=riscv64 -mattr=+d -target-abi ilp32d < %s 2>&1 \
14 # RUN: | FileCheck -check-prefix=RV64IFD-ILP32D %s
15 # RUN: llvm-mc -triple=riscv64 -target-abi ilp32e < %s 2>&1 \
16 # RUN: | FileCheck -check-prefix=RV64I-ILP32E %s
18 # RV64I-ILP32: 32-bit ABIs are not supported for 64-bit targets (ignoring target-abi)
19 # RV64IF-ILP32F: 32-bit ABIs are not supported for 64-bit targets (ignoring target-abi)
20 # RV64IFD-ILP32D: 32-bit ABIs are not supported for 64-bit targets (ignoring target-abi)
21 # RV64I-ILP32E: 32-bit ABIs are not supported for 64-bit targets (ignoring target-abi)
23 # RUN: llvm-mc -triple=riscv32 -target-abi lp64 < %s 2>&1 \
24 # RUN: | FileCheck -check-prefix=RV32I-LP64 %s
25 # RUN: llvm-mc -triple=riscv32 -mattr=+f -target-abi lp64f < %s 2>&1 \
26 # RUN: | FileCheck -check-prefix=RV32IF-LP64F %s
27 # RUN: llvm-mc -triple=riscv32 -mattr=+d -target-abi lp64d < %s 2>&1 \
28 # RUN: | FileCheck -check-prefix=RV32IFD-LP64D %s
29 # RUN: llvm-mc -triple=riscv32 -mattr=+e -target-abi lp64 < %s 2>&1 \
30 # RUN: | FileCheck -check-prefix=RV32E-LP64 %s
31 # RUN: llvm-mc -triple=riscv32 -mattr=+e,+f -target-abi lp64f < %s 2>&1 \
32 # RUN: | FileCheck -check-prefix=RV32EF-LP64F %s
33 # RUN: not --crash llvm-mc -triple=riscv32 -mattr=+e,+d -target-abi lp64f < %s 2>&1 \
34 # RUN: | FileCheck -check-prefix=RV32EFD-LP64D %s
35 # RUN: llvm-mc -triple=riscv32 -mattr=+e -target-abi lp64e %s 2>&1 \
36 # RUN: | FileCheck -check-prefix=RV32E-LP64E %s
38 # RV32I-LP64: 64-bit ABIs are not supported for 32-bit targets (ignoring target-abi)
39 # RV32IF-LP64F: 64-bit ABIs are not supported for 32-bit targets (ignoring target-abi)
40 # RV32IFD-LP64D: 64-bit ABIs are not supported for 32-bit targets (ignoring target-abi)
41 # RV32E-LP64: 64-bit ABIs are not supported for 32-bit targets (ignoring target-abi)
42 # RV32EF-LP64F: 64-bit ABIs are not supported for 32-bit targets (ignoring target-abi)
43 # RV32EFD-LP64D: 64-bit ABIs are not supported for 32-bit targets (ignoring target-abi)
44 # RV32E-LP64E: 64-bit ABIs are not supported for 32-bit targets (ignoring target-abi)
45 # RV32EFD-LP64D: LLVM ERROR: ILP32E cannot be used with the D ISA extension
47 # RUN: llvm-mc -triple=riscv32 -target-abi ilp32f < %s 2>&1 \
48 # RUN: | FileCheck -check-prefix=RV32I-ILP32F %s
49 # RUN: llvm-mc -triple=riscv64 -target-abi lp64f < %s 2>&1 \
50 # RUN: | FileCheck -check-prefix=RV64I-LP64F %s
52 # RV32I-ILP32F: Hard-float 'f' ABI can't be used for a target that doesn't support the F instruction set extension (ignoring target-abi)
53 # RV64I-LP64F: Hard-float 'f' ABI can't be used for a target that doesn't support the F instruction set extension (ignoring target-abi)
55 # RUN: llvm-mc -triple=riscv32 -target-abi ilp32d < %s 2>&1 \
56 # RUN: | FileCheck -check-prefix=RV32I-ILP32D %s
57 # RUN: llvm-mc -triple=riscv32 -mattr=+f -target-abi ilp32d < %s 2>&1 \
58 # RUN: | FileCheck -check-prefix=RV32IF-ILP32D %s
59 # RUN: llvm-mc -triple=riscv64 -target-abi lp64d < %s 2>&1 \
60 # RUN: | FileCheck -check-prefix=RV64I-LP64D %s
61 # RUN: llvm-mc -triple=riscv64 -mattr=+f -target-abi lp64d < %s 2>&1 \
62 # RUN: | FileCheck -check-prefix=RV64IF-LP64D %s
64 # RV32I-ILP32D: Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
65 # RV32IF-ILP32D: Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
66 # RV64I-LP64D: Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
67 # RV64IF-LP64D: Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
69 # RUN: llvm-mc -triple=riscv32 -mattr=+e -target-abi ilp32 < %s 2>&1 \
70 # RUN: | FileCheck -check-prefix=RV32EF-ILP32F %s
71 # RUN: llvm-mc -triple=riscv32 -mattr=+e,+f -target-abi ilp32f < %s 2>&1 \
72 # RUN: | FileCheck -check-prefix=RV32EF-ILP32F %s
73 # RUN: not --crash llvm-mc -triple=riscv32 -mattr=+e,+d -target-abi ilp32f < %s 2>&1 \
74 # RUN: | FileCheck -check-prefix=RV32EFD-ILP32F %s
75 # RUN: not --crash llvm-mc -triple=riscv32 -mattr=+e,+d -target-abi ilp32d < %s 2>&1 \
76 # RUN: | FileCheck -check-prefix=RV32EFD-ILP32D %s
78 # RV32E-ILP32: Only the ilp32e ABI is supported for RV32E (ignoring target-abi)
79 # RV32EF-ILP32F: Only the ilp32e ABI is supported for RV32E (ignoring target-abi)
80 # RV32EFD-ILP32F: Only the ilp32e ABI is supported for RV32E (ignoring target-abi)
81 # RV32EFD-ILP32F: LLVM ERROR: ILP32E cannot be used with the D ISA extension
82 # RV32EFD-ILP32D: Only the ilp32e ABI is supported for RV32E (ignoring target-abi)
83 # RV32EFD-ILP32D: LLVM ERROR: ILP32E cannot be used with the D ISA extension
85 # RUN: llvm-mc -triple=riscv64 -mattr=+e -target-abi lp64 < %s 2>&1 \
86 # RUN: | FileCheck -check-prefix=RV64EF-LP64F %s
87 # RUN: llvm-mc -triple=riscv64 -mattr=+e,+f -target-abi lp64f < %s 2>&1 \
88 # RUN: | FileCheck -check-prefix=RV64EF-LP64F %s
89 # RUN: llvm-mc -triple=riscv64 -mattr=+e,+d -target-abi lp64f < %s 2>&1 \
90 # RUN: | FileCheck -check-prefix=RV64EFD-LP64F %s
91 # RUN: llvm-mc -triple=riscv64 -mattr=+e,+d -target-abi lp64d < %s 2>&1 \
92 # RUN: | FileCheck -check-prefix=RV64EFD-LP64D %s
94 # RV64E-LP64: Only the lp64e ABI is supported for RV64E (ignoring target-abi)
95 # RV64EF-LP64F: Only the lp64e ABI is supported for RV64E (ignoring target-abi)
96 # RV64EFD-LP64F: Only the lp64e ABI is supported for RV64E (ignoring target-abi)
97 # RV64EFD-LP64D: Only the lp64e ABI is supported for RV64E (ignoring target-abi)
99 nop