1 // RUN: %clang --target=riscv32-unknown-elf %s -### 2>&1 \ 2 // RUN: | FileCheck -check-prefix=CHECK-ILP32 %s 3 // RUN: %clang --target=riscv32-unknown-elf %s -### -mabi=ilp32 2>&1 \ 4 // RUN: | FileCheck -check-prefix=CHECK-ILP32 %s 5 // RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32imc 2>&1 \ 6 // RUN: | FileCheck -check-prefix=CHECK-ILP32 %s 7 // RUN: %clang --target=riscv32-unknown-elf -x assembler %s -### 2>&1 \ 8 // RUN: | FileCheck -check-prefix=CHECK-ILP32 %s 9 // RUN: %clang --target=riscv32-unknown-elf -x assembler %s -### \ 10 // RUN: -mabi=ilp32 2>&1 | FileCheck -check-prefix=CHECK-ILP32 %s 11 12 // CHECK-ILP32: "-target-abi" "ilp32" 13 14 // RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32e -mabi=ilp32e 2>&1 \ 15 // RUN: | FileCheck -check-prefix=CHECK-ILP32E %s 16 // RUN: %clang --target=riscv32-unknown-elf %s -### -mabi=ilp32e 2>&1 \ 17 // RUN: | FileCheck -check-prefix=CHECK-ILP32E %s 18 // RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32e 2>&1 \ 19 // RUN: | FileCheck -check-prefix=CHECK-ILP32E %s 20 21 // CHECK-ILP32E: "-target-abi" "ilp32e" 22 23 // RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32if -mabi=ilp32f 2>&1 \ 24 // RUN: | FileCheck -check-prefix=CHECK-ILP32F %s 25 // RUN: %clang --target=riscv32-unknown-elf %s -### -mabi=ilp32f 2>&1 \ 26 // RUN: | FileCheck -check-prefix=CHECK-ILP32F %s 27 // RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32if 2>&1 \ 28 // RUN: | FileCheck -check-prefix=CHECK-ILP32F %s 29 30 // CHECK-ILP32F: "-target-abi" "ilp32f" 31 32 // RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32ifd -mabi=ilp32d 2>&1 \ 33 // RUN: | FileCheck -check-prefix=CHECK-ILP32D %s 34 // RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32ifd 2>&1 \ 35 // RUN: | FileCheck -check-prefix=CHECK-ILP32D %s 36 // RUN: %clang --target=riscv32-unknown-elf %s -### -march=rv32g 2>&1 \ 37 // RUN: | FileCheck -check-prefix=CHECK-ILP32D %s 38 // RUN: %clang --target=riscv32-unknown-linux-gnu %s -### 2>&1 \ 39 // RUN: | FileCheck -check-prefix=CHECK-ILP32D %s 40 // RUN: %clang --target=riscv32-unknown-linux-gnu -x assembler %s -### 2>&1 \ 41 // RUN: | FileCheck -check-prefix=CHECK-ILP32D %s 42 43 // CHECK-ILP32D: "-target-abi" "ilp32d" 44 45 // RUN: not %clang --target=riscv32-unknown-elf %s -o %t.o -mabi=lp64 2>&1 \ 46 // RUN: | FileCheck -check-prefix=CHECK-RV32-LP64 %s 47 48 // CHECK-RV32-LP64: error: unknown target ABI 'lp64' 49 50 // RUN: %clang --target=riscv64-unknown-elf %s -### 2>&1 \ 51 // RUN: | FileCheck -check-prefix=CHECK-LP64 %s 52 // RUN: %clang --target=riscv64-unknown-elf %s -### -mabi=lp64 2>&1 \ 53 // RUN: | FileCheck -check-prefix=CHECK-LP64 %s 54 // RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64imc 2>&1 \ 55 // RUN: | FileCheck -check-prefix=CHECK-LP64 %s 56 // RUN: %clang --target=riscv64-unknown-elf -x assembler %s -### 2>&1 \ 57 // RUN: | FileCheck -check-prefix=CHECK-LP64 %s 58 // RUN: %clang --target=riscv64-unknown-elf -x assembler %s -### \ 59 // RUN: -mabi=lp64 2>&1 | FileCheck -check-prefix=CHECK-LP64 %s 60 61 // CHECK-LP64: "-target-abi" "lp64" 62 63 // RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64if -mabi=lp64f 2>&1 \ 64 // RUN: | FileCheck -check-prefix=CHECK-LP64F %s 65 // RUN: %clang --target=riscv64-unknown-elf %s -### -mabi=lp64f 2>&1 \ 66 // RUN: | FileCheck -check-prefix=CHECK-LP64F %s 67 // RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64if 2>&1 \ 68 // RUN: | FileCheck -check-prefix=CHECK-LP64F %s 69 70 // CHECK-LP64F: "-target-abi" "lp64f" 71 72 // RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64ifd -mabi=lp64d 2>&1 \ 73 // RUN: | FileCheck -check-prefix=CHECK-LP64D %s 74 // RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64ifd 2>&1 \ 75 // RUN: | FileCheck -check-prefix=CHECK-LP64D %s 76 // RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64g 2>&1 \ 77 // RUN: | FileCheck -check-prefix=CHECK-LP64D %s 78 // RUN: %clang --target=riscv64-unknown-linux-gnu %s -### 2>&1 \ 79 // RUN: | FileCheck -check-prefix=CHECK-LP64D %s 80 // RUN: %clang --target=riscv64-unknown-linux-gnu -x assembler %s -### 2>&1 \ 81 // RUN: | FileCheck -check-prefix=CHECK-LP64D %s 82 83 // CHECK-LP64D: "-target-abi" "lp64d" 84 85 // RUN: not %clang --target=riscv64-unknown-elf %s -o %t.o -mabi=ilp32 2>&1 \ 86 // RUN: | FileCheck -check-prefix=CHECK-RV64-ILP32 %s 87 88 // CHECK-RV64-ILP32: error: unknown target ABI 'ilp32' 89