1 // RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o 2>&1 \ 2 // RUN: | FileCheck -check-prefix=CHECK-ILP32 %s 3 // RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -mabi=ilp32 2>&1 \ 4 // RUN: | FileCheck -check-prefix=CHECK-ILP32 %s 5 // RUN: %clang -target riscv32-unknown-elf -x assembler %s -### -o %t.o 2>&1 \ 6 // RUN: | FileCheck -check-prefix=CHECK-ILP32 %s 7 // RUN: %clang -target riscv32-unknown-elf -x assembler %s -### -o %t.o \ 8 // RUN: -mabi=ilp32 2>&1 | FileCheck -check-prefix=CHECK-ILP32 %s 9 10 // CHECK-ILP32: "-target-abi" "ilp32" 11 12 // RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32if -mabi=ilp32f 2>&1 \ 13 // RUN: | FileCheck -check-prefix=CHECK-ILP32F %s 14 15 // CHECK-ILP32F: "-target-abi" "ilp32f" 16 17 // RUN: %clang -target riscv32-unknown-elf %s -### -o %t.o -march=rv32ifd -mabi=ilp32d 2>&1 \ 18 // RUN: | FileCheck -check-prefix=CHECK-ILP32D %s 19 // RUN: %clang -target riscv32-unknown-linux-gnu %s -### -o %t.o 2>&1 \ 20 // RUN: | FileCheck -check-prefix=CHECK-ILP32D %s 21 // RUN: %clang -target riscv32-unknown-linux-gnu -x assembler %s -### -o %t.o 2>&1 \ 22 // RUN: | FileCheck -check-prefix=CHECK-ILP32D %s 23 24 // CHECK-ILP32D: "-target-abi" "ilp32d" 25 26 // RUN: not %clang -target riscv32-unknown-elf %s -o %t.o -mabi=lp64 2>&1 \ 27 // RUN: | FileCheck -check-prefix=CHECK-RV32-LP64 %s 28 29 // CHECK-RV32-LP64: error: unknown target ABI 'lp64' 30 31 // RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o 2>&1 \ 32 // RUN: | FileCheck -check-prefix=CHECK-LP64 %s 33 // RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o -mabi=lp64 2>&1 \ 34 // RUN: | FileCheck -check-prefix=CHECK-LP64 %s 35 // RUN: %clang -target riscv64-unknown-elf -x assembler %s -### -o %t.o 2>&1 \ 36 // RUN: | FileCheck -check-prefix=CHECK-LP64 %s 37 // RUN: %clang -target riscv64-unknown-elf -x assembler %s -### -o %t.o \ 38 // RUN: -mabi=lp64 2>&1 | FileCheck -check-prefix=CHECK-LP64 %s 39 40 // CHECK-LP64: "-target-abi" "lp64" 41 42 // RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o -march=rv64f -mabi=lp64f 2>&1 \ 43 // RUN: | FileCheck -check-prefix=CHECK-LP64F %s 44 45 // CHECK-LP64F: "-target-abi" "lp64f" 46 47 // RUN: %clang -target riscv64-unknown-elf %s -### -o %t.o -march=rv64d -mabi=lp64d 2>&1 \ 48 // RUN: | FileCheck -check-prefix=CHECK-LP64D %s 49 // RUN: %clang -target riscv64-unknown-linux-gnu %s -### -o %t.o 2>&1 \ 50 // RUN: | FileCheck -check-prefix=CHECK-LP64D %s 51 // RUN: %clang -target riscv64-unknown-linux-gnu -x assembler %s -### -o %t.o 2>&1 \ 52 // RUN: | FileCheck -check-prefix=CHECK-LP64D %s 53 54 // CHECK-LP64D: "-target-abi" "lp64d" 55 56 // RUN: not %clang -target riscv64-unknown-elf %s -o %t.o -mabi=ilp32 2>&1 \ 57 // RUN: | FileCheck -check-prefix=CHECK-RV64-ILP32 %s 58 59 // CHECK-RV64-ILP32: error: unknown target ABI 'ilp32' 60