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