• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // -modd-spreg
64 // RUN: %clang -target mips-linux-gnu -### -c %s -mno-odd-spreg -modd-spreg 2>&1 \
65 // RUN:   | FileCheck --check-prefix=CHECK-MODDSPREG %s
66 // CHECK-MODDSPREG: "-target-feature" "-nooddspreg"
67 //
68 // -mno-odd-spreg
69 // RUN: %clang -target mips-linux-gnu -### -c %s -modd-spreg -mno-odd-spreg 2>&1 \
70 // RUN:   | FileCheck --check-prefix=CHECK-NOMODDSPREG %s
71 // CHECK-NOMODDSPREG: "-target-feature" "+nooddspreg"
72 //
73 // -mfp64
74 // RUN: %clang -target mips-linux-gnu -### -c %s \
75 // RUN:     -mfp32 -mfp64 2>&1 \
76 // RUN:   | FileCheck --check-prefix=CHECK-MFP64 %s
77 // CHECK-MFP64: "-target-feature" "+fp64"
78 //
79 // -mfp32
80 // RUN: %clang -target mips-linux-gnu -### -c %s \
81 // RUN:     -mfp64 -mfp32 2>&1 \
82 // RUN:   | FileCheck --check-prefix=CHECK-NOMFP64 %s
83 // CHECK-NOMFP64: "-target-feature" "-fp64"
84 //
85 // -mnan=2008
86 // RUN: %clang -target mips-linux-gnu -### -c %s \
87 // RUN:     -mnan=legacy -mnan=2008 2>&1 \
88 // RUN:   | FileCheck --check-prefix=CHECK-NAN2008 %s
89 // CHECK-NAN2008: "-target-feature" "+nan2008"
90 //
91 // -mnan=legacy
92 // RUN: %clang -target mips-linux-gnu -### -c %s \
93 // RUN:     -mnan=2008 -mnan=legacy 2>&1 \
94 // RUN:   | FileCheck --check-prefix=CHECK-NANLEGACY %s
95 // CHECK-NANLEGACY: "-target-feature" "-nan2008"
96 //
97 // -mxgot
98 // RUN: %clang -target mips-linux-gnu -### -c %s \
99 // RUN:     -mno-xgot -mxgot 2>&1 \
100 // RUN:   | FileCheck --check-prefix=CHECK-XGOT %s
101 // CHECK-XGOT: "-mllvm" "-mxgot"
102 //
103 // -mno-xgot
104 // RUN: %clang -target mips-linux-gnu -### -c %s \
105 // RUN:     -mxgot -mno-xgot 2>&1 \
106 // RUN:   | FileCheck --check-prefix=CHECK-NOXGOT %s
107 // CHECK-NOXGOT-NOT: "-mllvm" "-mxgot"
108 //
109 // -mldc1-sdc1
110 // RUN: %clang -target mips-linux-gnu -### -c %s \
111 // RUN:     -mno-ldc1-sdc1 -mldc1-sdc1 2>&1 \
112 // RUN:   | FileCheck --check-prefix=CHECK-LDC1SDC1 %s
113 // CHECK-LDC1SDC1-NOT: "-mllvm" "-mno-ldc1-sdc1"
114 //
115 // -mno-ldc1-sdc1
116 // RUN: %clang -target mips-linux-gnu -### -c %s \
117 // RUN:     -mldc1-sdc1 -mno-ldc1-sdc1 2>&1 \
118 // RUN:   | FileCheck --check-prefix=CHECK-NOLDC1SDC1 %s
119 // CHECK-NOLDC1SDC1: "-mllvm" "-mno-ldc1-sdc1"
120 //
121 // -mcheck-zero-division
122 // RUN: %clang -target mips-linux-gnu -### -c %s \
123 // RUN:     -mno-check-zero-division -mcheck-zero-division 2>&1 \
124 // RUN:   | FileCheck --check-prefix=CHECK-ZERODIV %s
125 // CHECK-ZERODIV-NOT: "-mllvm" "-mno-check-zero-division"
126 //
127 // -mno-check-zero-division
128 // RUN: %clang -target mips-linux-gnu -### -c %s \
129 // RUN:     -mcheck-zero-division -mno-check-zero-division 2>&1 \
130 // RUN:   | FileCheck --check-prefix=CHECK-NOZERODIV %s
131 // CHECK-NOZERODIV: "-mllvm" "-mno-check-zero-division"
132 //
133 // -G
134 // RUN: %clang -target mips-linux-gnu -### -c %s \
135 // RUN:     -G 16 2>&1 \
136 // RUN:   | FileCheck --check-prefix=CHECK-MIPS-G %s
137 // CHECK-MIPS-G: "-mllvm" "-mips-ssection-threshold=16"
138