xref: /minix3/external/bsd/llvm/dist/clang/test/Driver/mips-features.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // Check handling MIPS specific features options.
2*f4a2713aSLionel Sambuc //
3*f4a2713aSLionel Sambuc // -mips16
4*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
5*f4a2713aSLionel Sambuc // RUN:     -mno-mips16 -mips16 2>&1 \
6*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MIPS16 %s
7*f4a2713aSLionel Sambuc // CHECK-MIPS16: "-target-feature" "+mips16"
8*f4a2713aSLionel Sambuc //
9*f4a2713aSLionel Sambuc // -mno-mips16
10*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
11*f4a2713aSLionel Sambuc // RUN:     -mips16 -mno-mips16 2>&1 \
12*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMIPS16 %s
13*f4a2713aSLionel Sambuc // CHECK-NOMIPS16: "-target-feature" "-mips16"
14*f4a2713aSLionel Sambuc //
15*f4a2713aSLionel Sambuc // -mmicromips
16*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
17*f4a2713aSLionel Sambuc // RUN:     -mno-micromips -mmicromips 2>&1 \
18*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MICROMIPS %s
19*f4a2713aSLionel Sambuc // CHECK-MICROMIPS: "-target-feature" "+micromips"
20*f4a2713aSLionel Sambuc //
21*f4a2713aSLionel Sambuc // -mno-micromips
22*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
23*f4a2713aSLionel Sambuc // RUN:     -mmicromips -mno-micromips 2>&1 \
24*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMICROMIPS %s
25*f4a2713aSLionel Sambuc // CHECK-NOMICROMIPS: "-target-feature" "-micromips"
26*f4a2713aSLionel Sambuc //
27*f4a2713aSLionel Sambuc // -mdsp
28*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
29*f4a2713aSLionel Sambuc // RUN:     -mno-dsp -mdsp 2>&1 \
30*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MDSP %s
31*f4a2713aSLionel Sambuc // CHECK-MDSP: "-target-feature" "+dsp"
32*f4a2713aSLionel Sambuc //
33*f4a2713aSLionel Sambuc // -mno-dsp
34*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
35*f4a2713aSLionel Sambuc // RUN:     -mdsp -mno-dsp 2>&1 \
36*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMDSP %s
37*f4a2713aSLionel Sambuc // CHECK-NOMDSP: "-target-feature" "-dsp"
38*f4a2713aSLionel Sambuc //
39*f4a2713aSLionel Sambuc // -mdspr2
40*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
41*f4a2713aSLionel Sambuc // RUN:     -mno-dspr2 -mdspr2 2>&1 \
42*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MDSPR2 %s
43*f4a2713aSLionel Sambuc // CHECK-MDSPR2: "-target-feature" "+dspr2"
44*f4a2713aSLionel Sambuc //
45*f4a2713aSLionel Sambuc // -mno-dspr2
46*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
47*f4a2713aSLionel Sambuc // RUN:     -mdspr2 -mno-dspr2 2>&1 \
48*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMDSPR2 %s
49*f4a2713aSLionel Sambuc // CHECK-NOMDSPR2: "-target-feature" "-dspr2"
50*f4a2713aSLionel Sambuc //
51*f4a2713aSLionel Sambuc // -mmsa
52*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
53*f4a2713aSLionel Sambuc // RUN:     -mno-msa -mmsa 2>&1 \
54*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MMSA %s
55*f4a2713aSLionel Sambuc // CHECK-MMSA: "-target-feature" "+msa"
56*f4a2713aSLionel Sambuc //
57*f4a2713aSLionel Sambuc // -mno-msa
58*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
59*f4a2713aSLionel Sambuc // RUN:     -mmsa -mno-msa 2>&1 \
60*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMMSA %s
61*f4a2713aSLionel Sambuc // CHECK-NOMMSA: "-target-feature" "-msa"
62*f4a2713aSLionel Sambuc //
63*f4a2713aSLionel Sambuc // -mfp64
64*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
65*f4a2713aSLionel Sambuc // RUN:     -mfp32 -mfp64 2>&1 \
66*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MFP64 %s
67*f4a2713aSLionel Sambuc // CHECK-MFP64: "-target-feature" "+fp64"
68*f4a2713aSLionel Sambuc //
69*f4a2713aSLionel Sambuc // -mfp32
70*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
71*f4a2713aSLionel Sambuc // RUN:     -mfp64 -mfp32 2>&1 \
72*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMFP64 %s
73*f4a2713aSLionel Sambuc // CHECK-NOMFP64: "-target-feature" "-fp64"
74*f4a2713aSLionel Sambuc //
75*f4a2713aSLionel Sambuc // -mxgot
76*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
77*f4a2713aSLionel Sambuc // RUN:     -mno-xgot -mxgot 2>&1 \
78*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-XGOT %s
79*f4a2713aSLionel Sambuc // CHECK-XGOT: "-mllvm" "-mxgot"
80*f4a2713aSLionel Sambuc //
81*f4a2713aSLionel Sambuc // -mno-xgot
82*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
83*f4a2713aSLionel Sambuc // RUN:     -mxgot -mno-xgot 2>&1 \
84*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOXGOT %s
85*f4a2713aSLionel Sambuc // CHECK-NOXGOT-NOT: "-mllvm" "-mxgot"
86*f4a2713aSLionel Sambuc //
87*f4a2713aSLionel Sambuc // -mldc1-sdc1
88*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
89*f4a2713aSLionel Sambuc // RUN:     -mno-ldc1-sdc1 -mldc1-sdc1 2>&1 \
90*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-LDC1SDC1 %s
91*f4a2713aSLionel Sambuc // CHECK-LDC1SDC1-NOT: "-mllvm" "-mno-ldc1-sdc1"
92*f4a2713aSLionel Sambuc //
93*f4a2713aSLionel Sambuc // -mno-ldc1-sdc1
94*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
95*f4a2713aSLionel Sambuc // RUN:     -mldc1-sdc1 -mno-ldc1-sdc1 2>&1 \
96*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOLDC1SDC1 %s
97*f4a2713aSLionel Sambuc // CHECK-NOLDC1SDC1: "-mllvm" "-mno-ldc1-sdc1"
98*f4a2713aSLionel Sambuc //
99*f4a2713aSLionel Sambuc // -mcheck-zero-division
100*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
101*f4a2713aSLionel Sambuc // RUN:     -mno-check-zero-division -mcheck-zero-division 2>&1 \
102*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-ZERODIV %s
103*f4a2713aSLionel Sambuc // CHECK-ZERODIV-NOT: "-mllvm" "-mno-check-zero-division"
104*f4a2713aSLionel Sambuc //
105*f4a2713aSLionel Sambuc // -mno-check-zero-division
106*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
107*f4a2713aSLionel Sambuc // RUN:     -mcheck-zero-division -mno-check-zero-division 2>&1 \
108*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOZERODIV %s
109*f4a2713aSLionel Sambuc // CHECK-NOZERODIV: "-mllvm" "-mno-check-zero-division"
110*f4a2713aSLionel Sambuc //
111*f4a2713aSLionel Sambuc // -G
112*f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
113*f4a2713aSLionel Sambuc // RUN:     -G 16 2>&1 \
114*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MIPS-G %s
115*f4a2713aSLionel Sambuc // CHECK-MIPS-G: "-mllvm" "-mips-ssection-threshold=16"
116