1 // Check handling MIPS specific features options. 2 // 3 // -mabicalls 4 // RUN: %clang -target mips-linux-gnu -### -c %s -mno-abicalls -mabicalls 2>&1 \ 5 // RUN: | FileCheck --check-prefix=CHECK-MABICALLS %s 6 // CHECK-MABICALLS: "-target-feature" "-noabicalls" 7 // 8 // -mno-abicalls 9 // RUN: %clang -target mips-linux-gnu -### -c %s -mabicalls -mno-abicalls 2>&1 \ 10 // RUN: | FileCheck --check-prefix=CHECK-MNOABICALLS %s 11 // CHECK-MNOABICALLS: "-target-feature" "+noabicalls" 12 // 13 // -mips16 14 // RUN: %clang -target mips-linux-gnu -### -c %s \ 15 // RUN: -mno-mips16 -mips16 2>&1 \ 16 // RUN: | FileCheck --check-prefix=CHECK-MIPS16 %s 17 // CHECK-MIPS16: "-target-feature" "+mips16" 18 // 19 // -mno-mips16 20 // RUN: %clang -target mips-linux-gnu -### -c %s \ 21 // RUN: -mips16 -mno-mips16 2>&1 \ 22 // RUN: | FileCheck --check-prefix=CHECK-NOMIPS16 %s 23 // CHECK-NOMIPS16: "-target-feature" "-mips16" 24 // 25 // -mmicromips 26 // RUN: %clang -target mips-linux-gnu -### -c %s \ 27 // RUN: -mno-micromips -mmicromips 2>&1 \ 28 // RUN: | FileCheck --check-prefix=CHECK-MICROMIPS %s 29 // CHECK-MICROMIPS: "-target-feature" "+micromips" 30 // 31 // -mno-micromips 32 // RUN: %clang -target mips-linux-gnu -### -c %s \ 33 // RUN: -mmicromips -mno-micromips 2>&1 \ 34 // RUN: | FileCheck --check-prefix=CHECK-NOMICROMIPS %s 35 // CHECK-NOMICROMIPS: "-target-feature" "-micromips" 36 // 37 // -mdsp 38 // RUN: %clang -target mips-linux-gnu -### -c %s \ 39 // RUN: -mno-dsp -mdsp 2>&1 \ 40 // RUN: | FileCheck --check-prefix=CHECK-MDSP %s 41 // CHECK-MDSP: "-target-feature" "+dsp" 42 // 43 // -mno-dsp 44 // RUN: %clang -target mips-linux-gnu -### -c %s \ 45 // RUN: -mdsp -mno-dsp 2>&1 \ 46 // RUN: | FileCheck --check-prefix=CHECK-NOMDSP %s 47 // CHECK-NOMDSP: "-target-feature" "-dsp" 48 // 49 // -mdspr2 50 // RUN: %clang -target mips-linux-gnu -### -c %s \ 51 // RUN: -mno-dspr2 -mdspr2 2>&1 \ 52 // RUN: | FileCheck --check-prefix=CHECK-MDSPR2 %s 53 // CHECK-MDSPR2: "-target-feature" "+dspr2" 54 // 55 // -mno-dspr2 56 // RUN: %clang -target mips-linux-gnu -### -c %s \ 57 // RUN: -mdspr2 -mno-dspr2 2>&1 \ 58 // RUN: | FileCheck --check-prefix=CHECK-NOMDSPR2 %s 59 // CHECK-NOMDSPR2: "-target-feature" "-dspr2" 60 // 61 // -mmsa 62 // RUN: %clang -target mips-linux-gnu -### -c %s \ 63 // RUN: -mno-msa -mmsa 2>&1 \ 64 // RUN: | FileCheck --check-prefix=CHECK-MMSA %s 65 // CHECK-MMSA: "-target-feature" "+msa" 66 // 67 // -mno-msa 68 // RUN: %clang -target mips-linux-gnu -### -c %s \ 69 // RUN: -mmsa -mno-msa 2>&1 \ 70 // RUN: | FileCheck --check-prefix=CHECK-NOMMSA %s 71 // CHECK-NOMMSA: "-target-feature" "-msa" 72 // 73 // -modd-spreg 74 // RUN: %clang -target mips-linux-gnu -### -c %s -mno-odd-spreg -modd-spreg 2>&1 \ 75 // RUN: | FileCheck --check-prefix=CHECK-MODDSPREG %s 76 // CHECK-MODDSPREG: "-target-feature" "-nooddspreg" 77 // 78 // -mno-odd-spreg 79 // RUN: %clang -target mips-linux-gnu -### -c %s -modd-spreg -mno-odd-spreg 2>&1 \ 80 // RUN: | FileCheck --check-prefix=CHECK-NOMODDSPREG %s 81 // CHECK-NOMODDSPREG: "-target-feature" "+nooddspreg" 82 // 83 // -mfpxx 84 // RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx 2>&1 \ 85 // RUN: | FileCheck --check-prefix=CHECK-MFPXX %s 86 // CHECK-MFPXX: "-target-feature" "+fpxx" 87 // CHECK-MFPXX: "-target-feature" "+nooddspreg" 88 // 89 // -mfpxx -modd-spreg 90 // RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx -modd-spreg 2>&1 \ 91 // RUN: | FileCheck --check-prefix=CHECK-MFPXX-ODDSPREG %s 92 // CHECK-MFPXX-ODDSPREG: "-target-feature" "+fpxx" 93 // CHECK-MFPXX-ODDSPREG: "-target-feature" "-nooddspreg" 94 // 95 // -mfp64 96 // RUN: %clang -target mips-linux-gnu -### -c %s \ 97 // RUN: -mfp32 -mfp64 2>&1 \ 98 // RUN: | FileCheck --check-prefix=CHECK-MFP64 %s 99 // CHECK-MFP64: "-target-feature" "+fp64" 100 // 101 // -mfp32 102 // RUN: %clang -target mips-linux-gnu -### -c %s \ 103 // RUN: -mfp64 -mfp32 2>&1 \ 104 // RUN: | FileCheck --check-prefix=CHECK-NOMFP64 %s 105 // CHECK-NOMFP64: "-target-feature" "-fp64" 106 // 107 // -mnan=2008 108 // RUN: %clang -target mips-linux-gnu -march=mips32r3 -### -c %s \ 109 // RUN: -mnan=legacy -mnan=2008 2>&1 \ 110 // RUN: | FileCheck --check-prefix=CHECK-NAN2008 %s 111 // CHECK-NAN2008: "-target-feature" "+nan2008" 112 // 113 // -mnan=legacy 114 // RUN: %clang -target mips-linux-gnu -march=mips32r3 -### -c %s \ 115 // RUN: -mnan=2008 -mnan=legacy 2>&1 \ 116 // RUN: | FileCheck --check-prefix=CHECK-NANLEGACY %s 117 // CHECK-NANLEGACY: "-target-feature" "-nan2008" 118 // 119 // -mxgot 120 // RUN: %clang -target mips-linux-gnu -### -c %s \ 121 // RUN: -mno-xgot -mxgot 2>&1 \ 122 // RUN: | FileCheck --check-prefix=CHECK-XGOT %s 123 // CHECK-XGOT: "-mllvm" "-mxgot" 124 // 125 // -mno-xgot 126 // RUN: %clang -target mips-linux-gnu -### -c %s \ 127 // RUN: -mxgot -mno-xgot 2>&1 \ 128 // RUN: | FileCheck --check-prefix=CHECK-NOXGOT %s 129 // CHECK-NOXGOT-NOT: "-mllvm" "-mxgot" 130 // 131 // -mldc1-sdc1 132 // RUN: %clang -target mips-linux-gnu -### -c %s \ 133 // RUN: -mno-ldc1-sdc1 -mldc1-sdc1 2>&1 \ 134 // RUN: | FileCheck --check-prefix=CHECK-LDC1SDC1 %s 135 // CHECK-LDC1SDC1-NOT: "-mllvm" "-mno-ldc1-sdc1" 136 // 137 // -mno-ldc1-sdc1 138 // RUN: %clang -target mips-linux-gnu -### -c %s \ 139 // RUN: -mldc1-sdc1 -mno-ldc1-sdc1 2>&1 \ 140 // RUN: | FileCheck --check-prefix=CHECK-NOLDC1SDC1 %s 141 // CHECK-NOLDC1SDC1: "-mllvm" "-mno-ldc1-sdc1" 142 // 143 // -mcheck-zero-division 144 // RUN: %clang -target mips-linux-gnu -### -c %s \ 145 // RUN: -mno-check-zero-division -mcheck-zero-division 2>&1 \ 146 // RUN: | FileCheck --check-prefix=CHECK-ZERODIV %s 147 // CHECK-ZERODIV-NOT: "-mllvm" "-mno-check-zero-division" 148 // 149 // -mno-check-zero-division 150 // RUN: %clang -target mips-linux-gnu -### -c %s \ 151 // RUN: -mcheck-zero-division -mno-check-zero-division 2>&1 \ 152 // RUN: | FileCheck --check-prefix=CHECK-NOZERODIV %s 153 // CHECK-NOZERODIV: "-mllvm" "-mno-check-zero-division" 154 // 155 // -G 156 // RUN: %clang -target mips-linux-gnu -### -c %s \ 157 // RUN: -G 16 2>&1 \ 158 // RUN: | FileCheck --check-prefix=CHECK-MIPS-G %s 159 // CHECK-MIPS-G: "-mllvm" "-mips-ssection-threshold=16" 160 // 161 // -msoft-float (unknown vendor) 162 // RUN: %clang -target mips-linux-gnu -### -c %s -msoft-float 2>&1 \ 163 // RUN: | FileCheck --check-prefix=CHECK-SOFTFLOAT %s 164 // CHECK-SOFTFLOAT: "-target-feature" "+soft-float" 165 // CHECK-SOFTFLOAT-NOT: "-target-feature" "+fpxx" 166 // 167 // -msoft-float -mfpxx (unknown vendor) 168 // RUN: %clang -target mips-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \ 169 // RUN: | FileCheck --check-prefix=CHECK-SOFTFLOAT-FPXX %s 170 // CHECK-SOFTFLOAT-FPXX: "-target-feature" "+soft-float" 171 // CHECK-SOFTFLOAT-FPXX: "-target-feature" "+fpxx" 172 // 173 // -msoft-float (MTI) 174 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msoft-float 2>&1 \ 175 // RUN: | FileCheck --check-prefix=CHECK-MTI-SOFTFLOAT %s 176 // CHECK-MTI-SOFTFLOAT: "-target-feature" "+soft-float" 177 // CHECK-MTI-SOFTFLOAT-NOT: "-target-feature" "+fpxx" 178 // 179 // -msoft-float -mfpxx (MTI) 180 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \ 181 // RUN: | FileCheck --check-prefix=CHECK-MTI-SOFTFLOAT-FPXX %s 182 // CHECK-MTI-SOFTFLOAT-FPXX: "-target-feature" "+soft-float" 183 // CHECK-MTI-SOFTFLOAT-FPXX: "-target-feature" "+fpxx" 184 // 185 // -msoft-float (IMG) 186 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msoft-float 2>&1 \ 187 // RUN: | FileCheck --check-prefix=CHECK-IMG-SOFTFLOAT %s 188 // CHECK-IMG-SOFTFLOAT: "-target-feature" "+soft-float" 189 // CHECK-IMG-SOFTFLOAT-NOT: "-target-feature" "+fpxx" 190 // 191 // -msoft-float -mfpxx (IMG) 192 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \ 193 // RUN: | FileCheck --check-prefix=CHECK-IMG-SOFTFLOAT-FPXX %s 194 // CHECK-IMG-SOFTFLOAT-FPXX: "-target-feature" "+soft-float" 195 // CHECK-IMG-SOFTFLOAT-FPXX: "-target-feature" "+fpxx" 196 // 197 // -msingle-float (unknown vendor) 198 // RUN: %clang -target mips-linux-gnu -### -c %s -msingle-float 2>&1 \ 199 // RUN: | FileCheck --check-prefix=CHECK-SINGLEFLOAT %s 200 // CHECK-SINGLEFLOAT: "-target-feature" "+single-float" 201 // CHECK-SINGLEFLOAT-NOT: "-target-feature" "+fpxx" 202 // 203 // -msingle-float -mfpxx (unknown vendor) 204 // RUN: %clang -target mips-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \ 205 // RUN: | FileCheck --check-prefix=CHECK-SINGLEFLOAT-FPXX %s 206 // CHECK-SINGLEFLOAT-FPXX: "-target-feature" "+single-float" 207 // CHECK-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx" 208 // 209 // -msingle-float (MTI) 210 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msingle-float 2>&1 \ 211 // RUN: | FileCheck --check-prefix=CHECK-MTI-SINGLEFLOAT %s 212 // CHECK-MTI-SINGLEFLOAT: "-target-feature" "+single-float" 213 // CHECK-MTI-SINGLEFLOAT-NOT: "-target-feature" "+fpxx" 214 // 215 // -msingle-float -mfpxx (MTI) 216 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \ 217 // RUN: | FileCheck --check-prefix=CHECK-MTI-SINGLEFLOAT-FPXX %s 218 // CHECK-MTI-SINGLEFLOAT-FPXX: "-target-feature" "+single-float" 219 // CHECK-MTI-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx" 220 // 221 // -msingle-float (IMG) 222 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msingle-float 2>&1 \ 223 // RUN: | FileCheck --check-prefix=CHECK-IMG-SINGLEFLOAT %s 224 // CHECK-IMG-SINGLEFLOAT: "-target-feature" "+single-float" 225 // CHECK-IMG-SINGLEFLOAT-NOT: "-target-feature" "+fpxx" 226 // 227 // -msingle-float -mfpxx (IMG) 228 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \ 229 // RUN: | FileCheck --check-prefix=CHECK-IMG-SINGLEFLOAT-FPXX %s 230 // CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+single-float" 231 // CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx" 232