Home | History | Annotate | Download | only in Driver
      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 // -mcompact-branches=never
    120 // RUN: %clang -target mips-linux-gnu -march=mips32r6 -### -c %s \
    121 // RUN:     -mcompact-branches=never 2>&1 \
    122 // RUN:   | FileCheck --check-prefix=CHECK-CBNEVER %s
    123 // CHECK-CBNEVER: "-mllvm" "-mips-compact-branches=never"
    124 //
    125 // -mcompact-branches=optimal
    126 // RUN: %clang -target mips-linux-gnu -march=mips32r6 -### -c %s \
    127 // RUN:     -mcompact-branches=optimal 2>&1 \
    128 // RUN:   | FileCheck --check-prefix=CHECK-CBOPTIMAL %s
    129 // CHECK-CBOPTIMAL: "-mllvm" "-mips-compact-branches=optimal"
    130 //
    131 // -mcompact-branches=always
    132 // RUN: %clang -target mips-linux-gnu -march=mips32r6 -### -c %s \
    133 // RUN:     -mcompact-branches=always 2>&1 \
    134 // RUN:   | FileCheck --check-prefix=CHECK-CBALWAYS %s
    135 // CHECK-CBALWAYS: "-mllvm" "-mips-compact-branches=always"
    136 //
    137 // -mxgot
    138 // RUN: %clang -target mips-linux-gnu -### -c %s \
    139 // RUN:     -mno-xgot -mxgot 2>&1 \
    140 // RUN:   | FileCheck --check-prefix=CHECK-XGOT %s
    141 // CHECK-XGOT: "-mllvm" "-mxgot"
    142 //
    143 // -mno-xgot
    144 // RUN: %clang -target mips-linux-gnu -### -c %s \
    145 // RUN:     -mxgot -mno-xgot 2>&1 \
    146 // RUN:   | FileCheck --check-prefix=CHECK-NOXGOT %s
    147 // CHECK-NOXGOT-NOT: "-mllvm" "-mxgot"
    148 //
    149 // -mldc1-sdc1
    150 // RUN: %clang -target mips-linux-gnu -### -c %s \
    151 // RUN:     -mno-ldc1-sdc1 -mldc1-sdc1 2>&1 \
    152 // RUN:   | FileCheck --check-prefix=CHECK-LDC1SDC1 %s
    153 // CHECK-LDC1SDC1-NOT: "-mllvm" "-mno-ldc1-sdc1"
    154 //
    155 // -mno-ldc1-sdc1
    156 // RUN: %clang -target mips-linux-gnu -### -c %s \
    157 // RUN:     -mldc1-sdc1 -mno-ldc1-sdc1 2>&1 \
    158 // RUN:   | FileCheck --check-prefix=CHECK-NOLDC1SDC1 %s
    159 // CHECK-NOLDC1SDC1: "-mllvm" "-mno-ldc1-sdc1"
    160 //
    161 // -mcheck-zero-division
    162 // RUN: %clang -target mips-linux-gnu -### -c %s \
    163 // RUN:     -mno-check-zero-division -mcheck-zero-division 2>&1 \
    164 // RUN:   | FileCheck --check-prefix=CHECK-ZERODIV %s
    165 // CHECK-ZERODIV-NOT: "-mllvm" "-mno-check-zero-division"
    166 //
    167 // -mno-check-zero-division
    168 // RUN: %clang -target mips-linux-gnu -### -c %s \
    169 // RUN:     -mcheck-zero-division -mno-check-zero-division 2>&1 \
    170 // RUN:   | FileCheck --check-prefix=CHECK-NOZERODIV %s
    171 // CHECK-NOZERODIV: "-mllvm" "-mno-check-zero-division"
    172 //
    173 // -G
    174 // RUN: %clang -target mips-linux-gnu -### -c %s \
    175 // RUN:     -G 16 2>&1 \
    176 // RUN:   | FileCheck --check-prefix=CHECK-MIPS-G %s
    177 // CHECK-MIPS-G: "-mllvm" "-mips-ssection-threshold=16"
    178 //
    179 // -msoft-float (unknown vendor)
    180 // RUN: %clang -target mips-linux-gnu -### -c %s -msoft-float 2>&1 \
    181 // RUN:   | FileCheck --check-prefix=CHECK-SOFTFLOAT %s
    182 // CHECK-SOFTFLOAT: "-target-feature" "+soft-float"
    183 // CHECK-SOFTFLOAT-NOT: "-target-feature" "+fpxx"
    184 //
    185 // -msoft-float -mfpxx (unknown vendor)
    186 // RUN: %clang -target mips-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \
    187 // RUN:   | FileCheck --check-prefix=CHECK-SOFTFLOAT-FPXX %s
    188 // CHECK-SOFTFLOAT-FPXX: "-target-feature" "+soft-float"
    189 // CHECK-SOFTFLOAT-FPXX: "-target-feature" "+fpxx"
    190 //
    191 // -msoft-float (MTI)
    192 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msoft-float 2>&1 \
    193 // RUN:   | FileCheck --check-prefix=CHECK-MTI-SOFTFLOAT %s
    194 // CHECK-MTI-SOFTFLOAT: "-target-feature" "+soft-float"
    195 // CHECK-MTI-SOFTFLOAT-NOT: "-target-feature" "+fpxx"
    196 //
    197 // -msoft-float -mfpxx (MTI)
    198 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \
    199 // RUN:   | FileCheck --check-prefix=CHECK-MTI-SOFTFLOAT-FPXX %s
    200 // CHECK-MTI-SOFTFLOAT-FPXX: "-target-feature" "+soft-float"
    201 // CHECK-MTI-SOFTFLOAT-FPXX: "-target-feature" "+fpxx"
    202 //
    203 // -msoft-float (IMG)
    204 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msoft-float 2>&1 \
    205 // RUN:   | FileCheck --check-prefix=CHECK-IMG-SOFTFLOAT %s
    206 // CHECK-IMG-SOFTFLOAT: "-target-feature" "+soft-float"
    207 // CHECK-IMG-SOFTFLOAT-NOT: "-target-feature" "+fpxx"
    208 //
    209 // -msoft-float -mfpxx (IMG)
    210 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \
    211 // RUN:   | FileCheck --check-prefix=CHECK-IMG-SOFTFLOAT-FPXX %s
    212 // CHECK-IMG-SOFTFLOAT-FPXX: "-target-feature" "+soft-float"
    213 // CHECK-IMG-SOFTFLOAT-FPXX: "-target-feature" "+fpxx"
    214 //
    215 // -msingle-float (unknown vendor)
    216 // RUN: %clang -target mips-linux-gnu -### -c %s -msingle-float 2>&1 \
    217 // RUN:   | FileCheck --check-prefix=CHECK-SINGLEFLOAT %s
    218 // CHECK-SINGLEFLOAT: "-target-feature" "+single-float"
    219 // CHECK-SINGLEFLOAT-NOT: "-target-feature" "+fpxx"
    220 //
    221 // -msingle-float -mfpxx (unknown vendor)
    222 // RUN: %clang -target mips-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \
    223 // RUN:   | FileCheck --check-prefix=CHECK-SINGLEFLOAT-FPXX %s
    224 // CHECK-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
    225 // CHECK-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
    226 //
    227 // -msingle-float (MTI)
    228 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msingle-float 2>&1 \
    229 // RUN:   | FileCheck --check-prefix=CHECK-MTI-SINGLEFLOAT %s
    230 // CHECK-MTI-SINGLEFLOAT: "-target-feature" "+single-float"
    231 // CHECK-MTI-SINGLEFLOAT-NOT: "-target-feature" "+fpxx"
    232 //
    233 // -msingle-float -mfpxx (MTI)
    234 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \
    235 // RUN:   | FileCheck --check-prefix=CHECK-MTI-SINGLEFLOAT-FPXX %s
    236 // CHECK-MTI-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
    237 // CHECK-MTI-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
    238 //
    239 // -msingle-float (IMG)
    240 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msingle-float 2>&1 \
    241 // RUN:   | FileCheck --check-prefix=CHECK-IMG-SINGLEFLOAT %s
    242 // CHECK-IMG-SINGLEFLOAT: "-target-feature" "+single-float"
    243 // CHECK-IMG-SINGLEFLOAT-NOT: "-target-feature" "+fpxx"
    244 //
    245 // -msingle-float -mfpxx (IMG)
    246 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \
    247 // RUN:   | FileCheck --check-prefix=CHECK-IMG-SINGLEFLOAT-FPXX %s
    248 // CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
    249 // CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
    250