• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Check passing options to the assembler for MIPS targets.
2 //
3 // RUN: %clang -target mips-linux-gnu -### \
4 // RUN:   -no-integrated-as -c %s 2>&1 \
5 // RUN:   | FileCheck -check-prefix=MIPS32-EB-AS %s
6 // MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
7 // MIPS32-EB-AS-NOT: "-KPIC"
8 //
9 // RUN: %clang -target mips-linux-gnu -### \
10 // RUN:   -no-integrated-as -fPIC -c %s 2>&1 \
11 // RUN:   | FileCheck -check-prefix=MIPS32-EB-PIC %s
12 // MIPS32-EB-PIC: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
13 // MIPS32-EB-PIC: "-KPIC"
14 //
15 // RUN: %clang -target mipsel-linux-gnu -### \
16 // RUN:   -no-integrated-as -c %s 2>&1 \
17 // RUN:   | FileCheck -check-prefix=MIPS32-DEF-EL-AS %s
18 // MIPS32-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EL"
19 //
20 // RUN: %clang -target mips64-linux-gnu -### \
21 // RUN:   -no-integrated-as -c %s 2>&1 \
22 // RUN:   | FileCheck -check-prefix=MIPS64-EB-AS %s
23 // MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
24 //
25 // RUN: %clang -target mips64el-linux-gnu -### \
26 // RUN:   -no-integrated-as -c %s 2>&1 \
27 // RUN:   | FileCheck -check-prefix=MIPS64-DEF-EL-AS %s
28 // MIPS64-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EL"
29 //
30 // RUN: %clang -target mips-linux-gnu -mabi=eabi -### \
31 // RUN:   -no-integrated-as -c %s 2>&1 \
32 // RUN:   | FileCheck -check-prefix=MIPS-EABI %s
33 // MIPS-EABI: as{{(.exe)?}}" "-march" "mips32" "-mabi" "eabi" "-EB"
34 //
35 // RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \
36 // RUN:   -no-integrated-as -c %s 2>&1 \
37 // RUN:   | FileCheck -check-prefix=MIPS-N32 %s
38 // MIPS-N32: as{{(.exe)?}}" "-march" "mips64" "-mabi" "n32" "-EB"
39 //
40 // RUN: %clang -target mipsel-linux-gnu -mabi=32 -### \
41 // RUN:   -no-integrated-as -c %s 2>&1 \
42 // RUN:   | FileCheck -check-prefix=MIPS32-EL-AS %s
43 // MIPS32-EL-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EL"
44 //
45 // RUN: %clang -target mips64el-linux-gnu -mabi=64 -### \
46 // RUN:   -no-integrated-as -c %s 2>&1 \
47 // RUN:   | FileCheck -check-prefix=MIPS64-EL-AS %s
48 // MIPS64-EL-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EL"
49 //
50 // RUN: %clang -target mips-linux-gnu -march=mips32r2 -### \
51 // RUN:   -no-integrated-as -c %s 2>&1 \
52 // RUN:   | FileCheck -check-prefix=MIPS-32R2 %s
53 // MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
54 //
55 // RUN: %clang -target mips-linux-gnu -mips32 -### \
56 // RUN:   -no-integrated-as -c %s 2>&1 \
57 // RUN:   | FileCheck -check-prefix=MIPS-ALIAS-32 %s
58 // MIPS-ALIAS-32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
59 //
60 // RUN: %clang -target mips-linux-gnu -mips32r2 -### \
61 // RUN:   -no-integrated-as -c %s 2>&1 \
62 // RUN:   | FileCheck -check-prefix=MIPS-ALIAS-32R2 %s
63 // MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
64 //
65 // RUN: %clang -target mips-linux-gnu -mips64 -### \
66 // RUN:   -no-integrated-as -c %s 2>&1 \
67 // RUN:   | FileCheck -check-prefix=MIPS-ALIAS-64 %s
68 // MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
69 //
70 // RUN: %clang -target mips-linux-gnu -mips64r2 -### \
71 // RUN:   -no-integrated-as -c %s 2>&1 \
72 // RUN:   | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s
73 // MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
74 //
75 // RUN: %clang -target mips-linux-gnu -mno-mips16 -mips16 -### \
76 // RUN:   -no-integrated-as -c %s 2>&1 \
77 // RUN:   | FileCheck -check-prefix=MIPS-16 %s
78 // MIPS-16: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mips16"
79 //
80 // RUN: %clang -target mips-linux-gnu -mips16 -mno-mips16 -### \
81 // RUN:   -no-integrated-as -c %s 2>&1 \
82 // RUN:   | FileCheck -check-prefix=MIPS-N16 %s
83 // MIPS-N16: as{{(.exe)?}}"
84 // MIPS-N16-NOT: "-mips16"
85 //
86 // RUN: %clang -target mips-linux-gnu -mno-micromips -mmicromips -### \
87 // RUN:   -no-integrated-as -c %s 2>&1 \
88 // RUN:   | FileCheck -check-prefix=MIPS-MICRO %s
89 // MIPS-MICRO: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mmicromips"
90 //
91 // RUN: %clang -target mips-linux-gnu -mmicromips -mno-micromips -### \
92 // RUN:   -no-integrated-as -c %s 2>&1 \
93 // RUN:   | FileCheck -check-prefix=MIPS-NMICRO %s
94 // MIPS-NMICRO: as{{(.exe)?}}"
95 // MIPS-NMICRO-NOT: "-mmicromips"
96 //
97 // RUN: %clang -target mips-linux-gnu -mno-dsp -mdsp -### \
98 // RUN:   -no-integrated-as -c %s 2>&1 \
99 // RUN:   | FileCheck -check-prefix=MIPS-DSP %s
100 // MIPS-DSP: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mdsp"
101 //
102 // RUN: %clang -target mips-linux-gnu -mdsp -mno-dsp -### \
103 // RUN:   -no-integrated-as -c %s 2>&1 \
104 // RUN:   | FileCheck -check-prefix=MIPS-NDSP %s
105 // MIPS-NDSP: as{{(.exe)?}}"
106 // MIPS-NDSP-NOT: "-mdsp"
107 //
108 // RUN: %clang -target mips-linux-gnu -mno-dspr2 -mdspr2 -### \
109 // RUN:   -no-integrated-as -c %s 2>&1 \
110 // RUN:   | FileCheck -check-prefix=MIPS-DSPR2 %s
111 // MIPS-DSPR2: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mdspr2"
112 //
113 // RUN: %clang -target mips-linux-gnu -mdspr2 -mno-dspr2 -### \
114 // RUN:   -no-integrated-as -c %s 2>&1 \
115 // RUN:   | FileCheck -check-prefix=MIPS-NDSPR2 %s
116 // MIPS-NDSPR2: as{{(.exe)?}}"
117 // MIPS-NDSPR2-NOT: "-mdspr2"
118