[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / Driver / csky-arch.c
blob4c1a349660b67b82e993bd09807a74f546a9812b
1 // RUN: %clang -target csky-unknown-elf -march=ck801 -### %s \
2 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK801
4 // CHECK-CK801: "-target-cpu" "ck801"
5 // CHECK-CK801: "-target-feature" "+elrw" "-target-feature" "+trust"
6 // CHECK-CK801: "-target-feature" "+e1"
8 // RUN: %clang -target csky-unknown-elf -march=ck802 -### %s \
9 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK802
11 // CHECK-CK802: "-target-cpu" "ck802"
12 // CHECK-CK802: "-target-feature" "+elrw" "-target-feature" "+trust"
13 // CHECK-CK802: "-target-feature" "+nvic" "-target-feature" "+e1"
14 // CHECK-CK802: "-target-feature" "+e2"
16 // RUN: %clang -target csky-unknown-elf -march=ck803 -### %s \
17 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK803
19 // CHECK-CK803: "-target-cpu" "ck803"
20 // CHECK-CK803: "-target-feature" "+hwdiv" "-target-feature" "+elrw"
21 // CHECK-CK803: "-target-feature" "+trust" "-target-feature" "+nvic"
22 // CHECK-CK803: "-target-feature" "+e1" "-target-feature" "+e2" "-target-feature" "+2e3"
23 // CHECK-CK803: "-target-feature" "+mp"
25 // RUN: %clang -target csky-unknown-elf -march=ck803s -### %s \
26 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK803S
28 // CHECK-CK803S: "-target-cpu" "ck803s"
29 // CHECK-CK803S: "-target-feature" "+hwdiv" "-target-feature" "+elrw"
30 // CHECK-CK803S: "-target-feature" "+trust" "-target-feature" "+nvic"
31 // CHECK-CK803S: "-target-feature" "+e1" "-target-feature" "+e2"
32 // CHECK-CK803S: "-target-feature" "+2e3" "-target-feature" "+mp"
34 // RUN: %clang -target csky-unknown-elf -march=ck804 -### %s \
35 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK804
37 // CHECK-CK804: "-target-cpu" "ck804"
38 // CHECK-CK804: "-target-feature" "+hwdiv" "-target-feature" "+elrw"
39 // CHECK-CK804: "-target-feature" "+trust" "-target-feature" "+nvic"
40 // CHECK-CK804: "-target-feature" "+doloop" "-target-feature" "+e1"
41 // CHECK-CK804: "-target-feature" "+e2" "-target-feature" "+2e3"
42 // CHECK-CK804: "-target-feature" "+mp" "-target-feature" "+3e3r1"
43 // CHECK-CK804: "-target-feature" "+3e3r2" "-target-feature" "+3e3r3"
45 // RUN: %clang -target csky-unknown-elf -march=ck805 -### %s \
46 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK805
48 // CHECK-CK805: "-target-cpu" "ck805"
49 // CHECK-CK805: "-target-feature" "+hwdiv" "-target-feature" "+elrw"
50 // CHECK-CK805: "-target-feature" "+trust" "-target-feature" "+nvic"
51 // CHECK-CK805: "-target-feature" "+doloop" "-target-feature" "+high-registers"
52 // CHECK-CK805: "-target-feature" "+vdsp2e3" "-target-feature" "+vdspv2" "-target-feature" "+e1"
53 // CHECK-CK805: "-target-feature" "+e2" "-target-feature" "+2e3" "-target-feature" "+mp"
54 // CHECK-CK805: "-target-feature" "+3e3r1" "-target-feature" "+3e3r2" "-target-feature" "+3e3r3"
56 // RUN: %clang -target csky-unknown-elf -march=ck807 -### %s \
57 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK807
59 // CHECK-CK807: "-target-cpu" "ck807"
60 // CHECK-CK807: "-target-feature" "+hwdiv" "-target-feature" "+edsp"
61 // CHECK-CK807: "-target-feature" "+dsp1e2" "-target-feature" "+dspe60" "-target-feature" "+elrw"
62 // CHECK-CK807: "-target-feature" "+trust" "-target-feature" "+cache" "-target-feature" "+nvic"
63 // CHECK-CK807: "-target-feature" "+high-registers" "-target-feature" "+hard-tp" "-target-feature" "+e1"
64 // CHECK-CK807: "-target-feature" "+e2" "-target-feature" "+2e3" "-target-feature" "+mp"
65 // CHECK-CK807: "-target-feature" "+3e7" "-target-feature" "+mp1e2"
67 // RUN: %clang -target csky-unknown-elf -march=ck810 -### %s \
68 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK810
70 // CHECK-CK810: "-target-cpu" "ck810"
71 // CHECK-CK810: "-target-feature" "+hwdiv" "-target-feature" "+edsp" "-target-feature" "+dsp1e2"
72 // CHECK-CK810: "-target-feature" "+dspe60" "-target-feature" "+elrw" "-target-feature" "+trust"
73 // CHECK-CK810: "-target-feature" "+cache" "-target-feature" "+nvic" "-target-feature" "+high-registers"
74 // CHECK-CK810: "-target-feature" "+hard-tp" "-target-feature" "+e1" "-target-feature" "+e2" "-target-feature" "+2e3"
75 // CHECK-CK810: "-target-feature" "+mp" "-target-feature" "+3e7" "-target-feature" "+mp1e2" "-target-feature" "+7e10"
77 // RUN: %clang -target csky-unknown-elf -march=ck810v -### %s \
78 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK810V
80 // CHECK-CK810V: "-target-cpu" "ck810v"
81 // CHECK-CK810V: "-target-feature" "+hwdiv" "-target-feature" "+edsp" "-target-feature" "+dsp1e2"
82 // CHECK-CK810V: "-target-feature" "+dspe60" "-target-feature" "+elrw" "-target-feature" "+trust"
83 // CHECK-CK810V: "-target-feature" "+cache" "-target-feature" "+nvic" "-target-feature" "+high-registers"
84 // CHECK-CK810V: "-target-feature" "+hard-tp" "-target-feature" "+vdspv1" "-target-feature" "+e1"
85 // CHECK-CK810V: "-target-feature" "+e2" "-target-feature" "+2e3" "-target-feature" "+mp"
86 // CHECK-CK810V: "-target-feature" "+3e7" "-target-feature" "+mp1e2" "-target-feature" "+7e10"
88 // RUN: %clang -target csky-unknown-elf -march=ck860 -### %s \
89 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK860
91 // CHECK-CK860: "-target-cpu" "ck860"
92 // CHECK-CK860: "-target-feature" "+hwdiv" "-target-feature" "+dspe60" "-target-feature" "+elrw"
93 // CHECK-CK860: "-target-feature" "+trust" "-target-feature" "+cache" "-target-feature" "+nvic"
94 // CHECK-CK860: "-target-feature" "+doloop" "-target-feature" "+high-registers" "-target-feature" "+hard-tp"
95 // CHECK-CK860: "-target-feature" "+e1" "-target-feature" "+e2" "-target-feature" "+2e3" "-target-feature" "+mp"
96 // CHECK-CK860: "-target-feature" "+3e3r1" "-target-feature" "+3e3r2" "-target-feature" "+3e3r3"
97 // CHECK-CK860: "-target-feature" "+3e7" "-target-feature" "+mp1e2" "-target-feature" "+7e10" "-target-feature" "+10e60"
99 // RUN: %clang -target csky-unknown-elf -march=ck860v -### %s \
100 // RUN: -fsyntax-only 2>&1 | FileCheck %s -check-prefixes=CHECK-CK860V
102 // CHECK-CK860V: "-target-cpu" "ck860v"
103 // CHECK-CK860V: "-target-feature" "+hwdiv" "-target-feature" "+dspe60" "-target-feature" "+elrw" "-target-feature" "+trust"
104 // CHECK-CK860V: "-target-feature" "+cache" "-target-feature" "+nvic" "-target-feature" "+doloop"
105 // CHECK-CK860V: "-target-feature" "+high-registers" "-target-feature" "+vdsp2e60f" "-target-feature" "+vdspv2"
106 // CHECK-CK860V: "-target-feature" "+hard-tp" "-target-feature" "+e1" "-target-feature" "+e2" "-target-feature" "+2e3"
107 // CHECK-CK860V: "-target-feature" "+mp" "-target-feature" "+3e3r1" "-target-feature" "+3e3r2" "-target-feature" "+3e3r3"
108 // CHECK-CK860V: "-target-feature" "+3e7" "-target-feature" "+mp1e2" "-target-feature" "+7e10" "-target-feature" "+10e60"