xref: /minix3/external/bsd/llvm/dist/clang/test/Driver/mips-features.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // Check handling MIPS specific features options.
2f4a2713aSLionel Sambuc //
3*0a6a1f1dSLionel Sambuc // -mabicalls
4*0a6a1f1dSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s -mno-abicalls -mabicalls 2>&1 \
5*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MABICALLS %s
6*0a6a1f1dSLionel Sambuc // CHECK-MABICALLS: "-target-feature" "-noabicalls"
7*0a6a1f1dSLionel Sambuc //
8*0a6a1f1dSLionel Sambuc // -mno-abicalls
9*0a6a1f1dSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s -mabicalls -mno-abicalls 2>&1 \
10*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MNOABICALLS %s
11*0a6a1f1dSLionel Sambuc // CHECK-MNOABICALLS: "-target-feature" "+noabicalls"
12*0a6a1f1dSLionel Sambuc //
13f4a2713aSLionel Sambuc // -mips16
14f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
15f4a2713aSLionel Sambuc // RUN:     -mno-mips16 -mips16 2>&1 \
16f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MIPS16 %s
17f4a2713aSLionel Sambuc // CHECK-MIPS16: "-target-feature" "+mips16"
18f4a2713aSLionel Sambuc //
19f4a2713aSLionel Sambuc // -mno-mips16
20f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
21f4a2713aSLionel Sambuc // RUN:     -mips16 -mno-mips16 2>&1 \
22f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMIPS16 %s
23f4a2713aSLionel Sambuc // CHECK-NOMIPS16: "-target-feature" "-mips16"
24f4a2713aSLionel Sambuc //
25f4a2713aSLionel Sambuc // -mmicromips
26f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
27f4a2713aSLionel Sambuc // RUN:     -mno-micromips -mmicromips 2>&1 \
28f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MICROMIPS %s
29f4a2713aSLionel Sambuc // CHECK-MICROMIPS: "-target-feature" "+micromips"
30f4a2713aSLionel Sambuc //
31f4a2713aSLionel Sambuc // -mno-micromips
32f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
33f4a2713aSLionel Sambuc // RUN:     -mmicromips -mno-micromips 2>&1 \
34f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMICROMIPS %s
35f4a2713aSLionel Sambuc // CHECK-NOMICROMIPS: "-target-feature" "-micromips"
36f4a2713aSLionel Sambuc //
37f4a2713aSLionel Sambuc // -mdsp
38f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
39f4a2713aSLionel Sambuc // RUN:     -mno-dsp -mdsp 2>&1 \
40f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MDSP %s
41f4a2713aSLionel Sambuc // CHECK-MDSP: "-target-feature" "+dsp"
42f4a2713aSLionel Sambuc //
43f4a2713aSLionel Sambuc // -mno-dsp
44f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
45f4a2713aSLionel Sambuc // RUN:     -mdsp -mno-dsp 2>&1 \
46f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMDSP %s
47f4a2713aSLionel Sambuc // CHECK-NOMDSP: "-target-feature" "-dsp"
48f4a2713aSLionel Sambuc //
49f4a2713aSLionel Sambuc // -mdspr2
50f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
51f4a2713aSLionel Sambuc // RUN:     -mno-dspr2 -mdspr2 2>&1 \
52f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MDSPR2 %s
53f4a2713aSLionel Sambuc // CHECK-MDSPR2: "-target-feature" "+dspr2"
54f4a2713aSLionel Sambuc //
55f4a2713aSLionel Sambuc // -mno-dspr2
56f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
57f4a2713aSLionel Sambuc // RUN:     -mdspr2 -mno-dspr2 2>&1 \
58f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMDSPR2 %s
59f4a2713aSLionel Sambuc // CHECK-NOMDSPR2: "-target-feature" "-dspr2"
60f4a2713aSLionel Sambuc //
61f4a2713aSLionel Sambuc // -mmsa
62f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
63f4a2713aSLionel Sambuc // RUN:     -mno-msa -mmsa 2>&1 \
64f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MMSA %s
65f4a2713aSLionel Sambuc // CHECK-MMSA: "-target-feature" "+msa"
66f4a2713aSLionel Sambuc //
67f4a2713aSLionel Sambuc // -mno-msa
68f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
69f4a2713aSLionel Sambuc // RUN:     -mmsa -mno-msa 2>&1 \
70f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMMSA %s
71f4a2713aSLionel Sambuc // CHECK-NOMMSA: "-target-feature" "-msa"
72f4a2713aSLionel Sambuc //
73*0a6a1f1dSLionel Sambuc // -modd-spreg
74*0a6a1f1dSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s -mno-odd-spreg -modd-spreg 2>&1 \
75*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MODDSPREG %s
76*0a6a1f1dSLionel Sambuc // CHECK-MODDSPREG: "-target-feature" "-nooddspreg"
77*0a6a1f1dSLionel Sambuc //
78*0a6a1f1dSLionel Sambuc // -mno-odd-spreg
79*0a6a1f1dSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s -modd-spreg -mno-odd-spreg 2>&1 \
80*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMODDSPREG %s
81*0a6a1f1dSLionel Sambuc // CHECK-NOMODDSPREG: "-target-feature" "+nooddspreg"
82*0a6a1f1dSLionel Sambuc //
83*0a6a1f1dSLionel Sambuc // -mfpxx
84*0a6a1f1dSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx 2>&1 \
85*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MFPXX %s
86*0a6a1f1dSLionel Sambuc // CHECK-MFPXX: "-target-feature" "+fpxx"
87*0a6a1f1dSLionel Sambuc // CHECK-MFPXX: "-target-feature" "+nooddspreg"
88*0a6a1f1dSLionel Sambuc //
89*0a6a1f1dSLionel Sambuc // -mfpxx -modd-spreg
90*0a6a1f1dSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx -modd-spreg 2>&1 \
91*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MFPXX-ODDSPREG %s
92*0a6a1f1dSLionel Sambuc // CHECK-MFPXX-ODDSPREG: "-target-feature" "+fpxx"
93*0a6a1f1dSLionel Sambuc // CHECK-MFPXX-ODDSPREG: "-target-feature" "-nooddspreg"
94*0a6a1f1dSLionel Sambuc //
95f4a2713aSLionel Sambuc // -mfp64
96f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
97f4a2713aSLionel Sambuc // RUN:     -mfp32 -mfp64 2>&1 \
98f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MFP64 %s
99f4a2713aSLionel Sambuc // CHECK-MFP64: "-target-feature" "+fp64"
100f4a2713aSLionel Sambuc //
101f4a2713aSLionel Sambuc // -mfp32
102f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
103f4a2713aSLionel Sambuc // RUN:     -mfp64 -mfp32 2>&1 \
104f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOMFP64 %s
105f4a2713aSLionel Sambuc // CHECK-NOMFP64: "-target-feature" "-fp64"
106f4a2713aSLionel Sambuc //
107*0a6a1f1dSLionel Sambuc // -mnan=2008
108*0a6a1f1dSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
109*0a6a1f1dSLionel Sambuc // RUN:     -mnan=legacy -mnan=2008 2>&1 \
110*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NAN2008 %s
111*0a6a1f1dSLionel Sambuc // CHECK-NAN2008: "-target-feature" "+nan2008"
112*0a6a1f1dSLionel Sambuc //
113*0a6a1f1dSLionel Sambuc // -mnan=legacy
114*0a6a1f1dSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
115*0a6a1f1dSLionel Sambuc // RUN:     -mnan=2008 -mnan=legacy 2>&1 \
116*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NANLEGACY %s
117*0a6a1f1dSLionel Sambuc // CHECK-NANLEGACY: "-target-feature" "-nan2008"
118*0a6a1f1dSLionel Sambuc //
119f4a2713aSLionel Sambuc // -mxgot
120f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
121f4a2713aSLionel Sambuc // RUN:     -mno-xgot -mxgot 2>&1 \
122f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-XGOT %s
123f4a2713aSLionel Sambuc // CHECK-XGOT: "-mllvm" "-mxgot"
124f4a2713aSLionel Sambuc //
125f4a2713aSLionel Sambuc // -mno-xgot
126f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
127f4a2713aSLionel Sambuc // RUN:     -mxgot -mno-xgot 2>&1 \
128f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOXGOT %s
129f4a2713aSLionel Sambuc // CHECK-NOXGOT-NOT: "-mllvm" "-mxgot"
130f4a2713aSLionel Sambuc //
131f4a2713aSLionel Sambuc // -mldc1-sdc1
132f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
133f4a2713aSLionel Sambuc // RUN:     -mno-ldc1-sdc1 -mldc1-sdc1 2>&1 \
134f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-LDC1SDC1 %s
135f4a2713aSLionel Sambuc // CHECK-LDC1SDC1-NOT: "-mllvm" "-mno-ldc1-sdc1"
136f4a2713aSLionel Sambuc //
137f4a2713aSLionel Sambuc // -mno-ldc1-sdc1
138f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
139f4a2713aSLionel Sambuc // RUN:     -mldc1-sdc1 -mno-ldc1-sdc1 2>&1 \
140f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOLDC1SDC1 %s
141f4a2713aSLionel Sambuc // CHECK-NOLDC1SDC1: "-mllvm" "-mno-ldc1-sdc1"
142f4a2713aSLionel Sambuc //
143f4a2713aSLionel Sambuc // -mcheck-zero-division
144f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
145f4a2713aSLionel Sambuc // RUN:     -mno-check-zero-division -mcheck-zero-division 2>&1 \
146f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-ZERODIV %s
147f4a2713aSLionel Sambuc // CHECK-ZERODIV-NOT: "-mllvm" "-mno-check-zero-division"
148f4a2713aSLionel Sambuc //
149f4a2713aSLionel Sambuc // -mno-check-zero-division
150f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
151f4a2713aSLionel Sambuc // RUN:     -mcheck-zero-division -mno-check-zero-division 2>&1 \
152f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-NOZERODIV %s
153f4a2713aSLionel Sambuc // CHECK-NOZERODIV: "-mllvm" "-mno-check-zero-division"
154f4a2713aSLionel Sambuc //
155f4a2713aSLionel Sambuc // -G
156f4a2713aSLionel Sambuc // RUN: %clang -target mips-linux-gnu -### -c %s \
157f4a2713aSLionel Sambuc // RUN:     -G 16 2>&1 \
158f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-MIPS-G %s
159f4a2713aSLionel Sambuc // CHECK-MIPS-G: "-mllvm" "-mips-ssection-threshold=16"
160