blob: 28048e7740f2c4a44180129212cc92a188ec909b [file] [log] [blame]
Jim Grosbachf7947052012-07-09 18:34:21 +00001// REQUIRES: mips-registered-target
2//
Simon Atanasyan0b273ef2012-07-05 14:19:39 +00003// Check handling MIPS specific features options.
4//
5// -mips16
6// RUN: %clang -target mips-linux-gnu -### -c %s \
7// RUN: -mno-mips16 -mips16 2>&1 \
8// RUN: | FileCheck --check-prefix=CHECK-MIPS16 %s
9// CHECK-MIPS16: "-target-feature" "+mips16"
10//
11// -mno-mips16
12// RUN: %clang -target mips-linux-gnu -### -c %s \
13// RUN: -mips16 -mno-mips16 2>&1 \
14// RUN: | FileCheck --check-prefix=CHECK-NOMIPS16 %s
15// CHECK-NOMIPS16: "-target-feature" "-mips16"
Simon Atanasyand797a852012-07-05 19:23:00 +000016//
17// -mdsp
18// RUN: %clang -target mips-linux-gnu -### -c %s \
19// RUN: -mno-dsp -mdsp 2>&1 \
20// RUN: | FileCheck --check-prefix=CHECK-MDSP %s
21// CHECK-MDSP: "-target-feature" "+dsp"
22//
23// -mno-dsp
24// RUN: %clang -target mips-linux-gnu -### -c %s \
25// RUN: -mdsp -mno-dsp 2>&1 \
26// RUN: | FileCheck --check-prefix=CHECK-NOMDSP %s
27// CHECK-NOMDSP: "-target-feature" "-dsp"
28//
29// -mdspr2
30// RUN: %clang -target mips-linux-gnu -### -c %s \
31// RUN: -mno-dspr2 -mdspr2 2>&1 \
32// RUN: | FileCheck --check-prefix=CHECK-MDSPR2 %s
33// CHECK-MDSPR2: "-target-feature" "+dspr2"
34//
35// -mno-dspr2
36// RUN: %clang -target mips-linux-gnu -### -c %s \
37// RUN: -mdspr2 -mno-dspr2 2>&1 \
38// RUN: | FileCheck --check-prefix=CHECK-NOMDSPR2 %s
39// CHECK-NOMDSPR2: "-target-feature" "-dspr2"
Simon Atanasyan9804b762012-08-27 20:55:56 +000040//
41// -G
42// RUN: %clang -target mips-linux-gnu -### -c %s \
43// RUN: -G 16 2>&1 \
44// RUN: | FileCheck --check-prefix=CHECK-MIPS-G %s
45// CHECK-MIPS-G: "-mllvm" "-mips-ssection-threshold=16"