blob: 755ae83576f145dd765758355c8bb8b6ec786b70 [file] [log] [blame]
Simon Atanasyan5f0a1c12012-04-06 19:15:24 +00001// 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 \
Stephen Hinesc568f1e2014-07-21 00:47:37 -07005// RUN: | FileCheck -check-prefix=MIPS32R2-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -08006// RUN: %clang -target mipsel-linux-gnu -### \
7// RUN: -no-integrated-as -c -EB %s 2>&1 \
8// RUN: | FileCheck -check-prefix=MIPS32R2-EB-AS %s
9// MIPS32R2-EB-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -070010// MIPS32R2-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
Simon Atanasyan1f0646e2012-05-29 19:07:33 +000011//
12// RUN: %clang -target mips-linux-gnu -### \
13// RUN: -no-integrated-as -fPIC -c %s 2>&1 \
Stephen Hinesc568f1e2014-07-21 00:47:37 -070014// RUN: | FileCheck -check-prefix=MIPS32R2-EB-PIC %s
Stephen Hines176edba2014-12-01 14:53:08 -080015// MIPS32R2-EB-PIC: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -070016// MIPS32R2-EB-PIC: "-KPIC"
Simon Atanasyan5f0a1c12012-04-06 19:15:24 +000017//
18// RUN: %clang -target mipsel-linux-gnu -### \
19// RUN: -no-integrated-as -c %s 2>&1 \
Stephen Hinesc568f1e2014-07-21 00:47:37 -070020// RUN: | FileCheck -check-prefix=MIPS32R2-DEF-EL-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -080021// MIPS32R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EL"
Simon Atanasyan5f0a1c12012-04-06 19:15:24 +000022//
23// RUN: %clang -target mips64-linux-gnu -### \
24// RUN: -no-integrated-as -c %s 2>&1 \
Stephen Hinesc568f1e2014-07-21 00:47:37 -070025// RUN: | FileCheck -check-prefix=MIPS64R2-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -080026// MIPS64R2-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
Simon Atanasyan5f0a1c12012-04-06 19:15:24 +000027//
28// RUN: %clang -target mips64el-linux-gnu -### \
29// RUN: -no-integrated-as -c %s 2>&1 \
Stephen Hinesc568f1e2014-07-21 00:47:37 -070030// RUN: | FileCheck -check-prefix=MIPS64R2-DEF-EL-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -080031// MIPS64R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL"
Simon Atanasyan073a7802012-04-07 22:31:29 +000032//
33// RUN: %clang -target mips-linux-gnu -mabi=eabi -### \
34// RUN: -no-integrated-as -c %s 2>&1 \
35// RUN: | FileCheck -check-prefix=MIPS-EABI %s
Stephen Hines176edba2014-12-01 14:53:08 -080036// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "eabi" "-mno-shared" "-call_nonpic" "-EB"
Simon Atanasyan073a7802012-04-07 22:31:29 +000037//
38// RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \
39// RUN: -no-integrated-as -c %s 2>&1 \
40// RUN: | FileCheck -check-prefix=MIPS-N32 %s
Stephen Hines176edba2014-12-01 14:53:08 -080041// MIPS-N32: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-mno-shared" "-call_nonpic" "-EB"
Simon Atanasyan89d83ff2012-09-10 08:32:41 +000042//
Simon Atanasyane9616a42013-02-27 14:55:49 +000043// RUN: %clang -target mipsel-linux-gnu -mabi=32 -### \
44// RUN: -no-integrated-as -c %s 2>&1 \
Stephen Hinesc568f1e2014-07-21 00:47:37 -070045// RUN: | FileCheck -check-prefix=MIPS32R2-EL-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -080046// RUN: %clang -target mips-linux-gnu -mabi=32 -### \
47// RUN: -no-integrated-as -c %s -EL 2>&1 \
48// RUN: | FileCheck -check-prefix=MIPS32R2-EL-AS %s
49// MIPS32R2-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EL"
Simon Atanasyane9616a42013-02-27 14:55:49 +000050//
51// RUN: %clang -target mips64el-linux-gnu -mabi=64 -### \
52// RUN: -no-integrated-as -c %s 2>&1 \
Stephen Hinesc568f1e2014-07-21 00:47:37 -070053// RUN: | FileCheck -check-prefix=MIPS64R2-EL-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -080054// MIPS64R2-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL"
Simon Atanasyane9616a42013-02-27 14:55:49 +000055//
Simon Atanasyan89d83ff2012-09-10 08:32:41 +000056// RUN: %clang -target mips-linux-gnu -march=mips32r2 -### \
57// RUN: -no-integrated-as -c %s 2>&1 \
58// RUN: | FileCheck -check-prefix=MIPS-32R2 %s
Stephen Hines176edba2014-12-01 14:53:08 -080059// MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Simon Atanasyan8e1c5982012-09-21 20:19:32 +000060//
Stephen Hinesc568f1e2014-07-21 00:47:37 -070061// RUN: %clang -target mips64-linux-gnu -march=octeon -### \
62// RUN: -no-integrated-as -c %s 2>&1 \
63// RUN: | FileCheck -check-prefix=MIPS-OCTEON %s
Stephen Hines176edba2014-12-01 14:53:08 -080064// MIPS-OCTEON: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -070065//
66// RUN: %clang -target mips-linux-gnu -mips1 -### \
67// RUN: -no-integrated-as -c %s 2>&1 \
68// RUN: | FileCheck -check-prefix=MIPS-ALIAS-1 %s
Stephen Hines176edba2014-12-01 14:53:08 -080069// MIPS-ALIAS-1: as{{(.exe)?}}" "-march" "mips1" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -070070//
71// RUN: %clang -target mips-linux-gnu -mips2 -### \
72// RUN: -no-integrated-as -c %s 2>&1 \
73// RUN: | FileCheck -check-prefix=MIPS-ALIAS-2 %s
Stephen Hines176edba2014-12-01 14:53:08 -080074// MIPS-ALIAS-2: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -070075//
76// RUN: %clang -target mips-linux-gnu -mips3 -### \
77// RUN: -no-integrated-as -c %s 2>&1 \
78// RUN: | FileCheck -check-prefix=MIPS-ALIAS-3 %s
Stephen Hines176edba2014-12-01 14:53:08 -080079// MIPS-ALIAS-3: as{{(.exe)?}}" "-march" "mips3" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -070080//
81// RUN: %clang -target mips-linux-gnu -mips4 -### \
82// RUN: -no-integrated-as -c %s 2>&1 \
83// RUN: | FileCheck -check-prefix=MIPS-ALIAS-4 %s
Stephen Hines176edba2014-12-01 14:53:08 -080084// MIPS-ALIAS-4: as{{(.exe)?}}" "-march" "mips4" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -070085//
86// RUN: %clang -target mips-linux-gnu -mips5 -### \
87// RUN: -no-integrated-as -c %s 2>&1 \
88// RUN: | FileCheck -check-prefix=MIPS-ALIAS-5 %s
Stephen Hines176edba2014-12-01 14:53:08 -080089// MIPS-ALIAS-5: as{{(.exe)?}}" "-march" "mips5" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -070090//
Simon Atanasyan8e1c5982012-09-21 20:19:32 +000091// RUN: %clang -target mips-linux-gnu -mips32 -### \
92// RUN: -no-integrated-as -c %s 2>&1 \
93// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32 %s
Stephen Hines176edba2014-12-01 14:53:08 -080094// MIPS-ALIAS-32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Simon Atanasyan8e1c5982012-09-21 20:19:32 +000095//
96// RUN: %clang -target mips-linux-gnu -mips32r2 -### \
97// RUN: -no-integrated-as -c %s 2>&1 \
98// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R2 %s
Stephen Hines176edba2014-12-01 14:53:08 -080099// MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Simon Atanasyan8e1c5982012-09-21 20:19:32 +0000100//
Stephen Hines0e2c34f2015-03-23 12:09:02 -0700101// RUN: %clang -target mips-linux-gnu -mips32r3 -### \
102// RUN: -no-integrated-as -c %s 2>&1 \
103// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R3 %s
104// MIPS-ALIAS-32R3: as{{(.exe)?}}" "-march" "mips32r3" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
105//
106// RUN: %clang -target mips-linux-gnu -mips32r5 -### \
107// RUN: -no-integrated-as -c %s 2>&1 \
108// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R5 %s
109// MIPS-ALIAS-32R5: as{{(.exe)?}}" "-march" "mips32r5" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
110//
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700111// RUN: %clang -target mips-linux-gnu -mips32r6 -### \
112// RUN: -no-integrated-as -c %s 2>&1 \
113// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R6 %s
Stephen Hines176edba2014-12-01 14:53:08 -0800114// MIPS-ALIAS-32R6: as{{(.exe)?}}" "-march" "mips32r6" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700115//
116// RUN: %clang -target mips64-linux-gnu -mips64 -### \
Simon Atanasyan8e1c5982012-09-21 20:19:32 +0000117// RUN: -no-integrated-as -c %s 2>&1 \
118// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64 %s
Stephen Hines176edba2014-12-01 14:53:08 -0800119// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
Simon Atanasyan8e1c5982012-09-21 20:19:32 +0000120//
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700121// RUN: %clang -target mips64-linux-gnu -mips64r2 -### \
Simon Atanasyan8e1c5982012-09-21 20:19:32 +0000122// RUN: -no-integrated-as -c %s 2>&1 \
123// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s
Stephen Hines176edba2014-12-01 14:53:08 -0800124// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000125//
Stephen Hines0e2c34f2015-03-23 12:09:02 -0700126// RUN: %clang -target mips64-linux-gnu -mips64r3 -### \
127// RUN: -no-integrated-as -c %s 2>&1 \
128// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R3 %s
129// MIPS-ALIAS-64R3: as{{(.exe)?}}" "-march" "mips64r3" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
130//
131// RUN: %clang -target mips64-linux-gnu -mips64r5 -### \
132// RUN: -no-integrated-as -c %s 2>&1 \
133// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R5 %s
134// MIPS-ALIAS-64R5: as{{(.exe)?}}" "-march" "mips64r5" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
135//
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700136// RUN: %clang -target mips64-linux-gnu -mips64r6 -### \
137// RUN: -no-integrated-as -c %s 2>&1 \
138// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R6 %s
Stephen Hines176edba2014-12-01 14:53:08 -0800139// MIPS-ALIAS-64R6: as{{(.exe)?}}" "-march" "mips64r6" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700140//
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000141// RUN: %clang -target mips-linux-gnu -mno-mips16 -mips16 -### \
142// RUN: -no-integrated-as -c %s 2>&1 \
143// RUN: | FileCheck -check-prefix=MIPS-16 %s
Stephen Hines176edba2014-12-01 14:53:08 -0800144// MIPS-16: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mips16"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000145//
146// RUN: %clang -target mips-linux-gnu -mips16 -mno-mips16 -### \
147// RUN: -no-integrated-as -c %s 2>&1 \
148// RUN: | FileCheck -check-prefix=MIPS-N16 %s
149// MIPS-N16: as{{(.exe)?}}"
Stephen Hines176edba2014-12-01 14:53:08 -0800150// MIPS-N16: -no-mips16
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000151//
152// RUN: %clang -target mips-linux-gnu -mno-micromips -mmicromips -### \
153// RUN: -no-integrated-as -c %s 2>&1 \
154// RUN: | FileCheck -check-prefix=MIPS-MICRO %s
Stephen Hines176edba2014-12-01 14:53:08 -0800155// MIPS-MICRO: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mmicromips"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000156//
157// RUN: %clang -target mips-linux-gnu -mmicromips -mno-micromips -### \
158// RUN: -no-integrated-as -c %s 2>&1 \
159// RUN: | FileCheck -check-prefix=MIPS-NMICRO %s
160// MIPS-NMICRO: as{{(.exe)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -0700161// MIPS-NMICRO-NOT: {{[A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mmicromips"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000162//
163// RUN: %clang -target mips-linux-gnu -mno-dsp -mdsp -### \
164// RUN: -no-integrated-as -c %s 2>&1 \
165// RUN: | FileCheck -check-prefix=MIPS-DSP %s
Stephen Hines176edba2014-12-01 14:53:08 -0800166// MIPS-DSP: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mdsp"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000167//
168// RUN: %clang -target mips-linux-gnu -mdsp -mno-dsp -### \
169// RUN: -no-integrated-as -c %s 2>&1 \
170// RUN: | FileCheck -check-prefix=MIPS-NDSP %s
171// MIPS-NDSP: as{{(.exe)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -0700172// MIPS-NDSP-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mdsp"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000173//
174// RUN: %clang -target mips-linux-gnu -mno-dspr2 -mdspr2 -### \
175// RUN: -no-integrated-as -c %s 2>&1 \
176// RUN: | FileCheck -check-prefix=MIPS-DSPR2 %s
Stephen Hines176edba2014-12-01 14:53:08 -0800177// MIPS-DSPR2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mdspr2"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000178//
179// RUN: %clang -target mips-linux-gnu -mdspr2 -mno-dspr2 -### \
180// RUN: -no-integrated-as -c %s 2>&1 \
181// RUN: | FileCheck -check-prefix=MIPS-NDSPR2 %s
182// MIPS-NDSPR2: as{{(.exe)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -0700183// MIPS-NDSPR2-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mdspr2"
Simon Atanasyanfc12c4a2013-09-24 09:09:16 +0000184//
185// RUN: %clang -target mips-linux-gnu -mnan=legacy -mnan=2008 -### \
186// RUN: -no-integrated-as -c %s 2>&1 \
187// RUN: | FileCheck -check-prefix=MIPS-NAN2008 %s
Stephen Hines176edba2014-12-01 14:53:08 -0800188// MIPS-NAN2008: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mnan=2008"
Simon Atanasyanfc12c4a2013-09-24 09:09:16 +0000189//
190// RUN: %clang -target mips-linux-gnu -mnan=2008 -mnan=legacy -### \
191// RUN: -no-integrated-as -c %s 2>&1 \
192// RUN: | FileCheck -check-prefix=MIPS-NAN-LEGACY %s
193// MIPS-NAN-LEGACY: as{{(.exe)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -0700194// MIPS-NAN-LEGACY-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mnan={{.*}}"
Daniel Sanders6c5c3ad2013-12-02 10:00:07 +0000195//
Stephen Hines176edba2014-12-01 14:53:08 -0800196// RUN: %clang -target mips-linux-gnu -mfp64 -mfpxx -mfp32 -### \
Daniel Sanders6c5c3ad2013-12-02 10:00:07 +0000197// RUN: -no-integrated-as -c %s 2>&1 \
198// RUN: | FileCheck -check-prefix=MIPS-MFP32 %s
Stephen Hines176edba2014-12-01 14:53:08 -0800199// MIPS-MFP32: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mfp32"
Daniel Sanders6c5c3ad2013-12-02 10:00:07 +0000200//
Stephen Hines176edba2014-12-01 14:53:08 -0800201// RUN: %clang -target mips-linux-gnu -mfp32 -mfp64 -mfpxx -### \
202// RUN: -no-integrated-as -c %s 2>&1 \
203// RUN: | FileCheck -check-prefix=MIPS-MFPXX %s
204// MIPS-MFPXX: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mfpxx"
205//
206// RUN: %clang -target mips-linux-gnu -mfpxx -mfp32 -mfp64 -### \
Daniel Sanders6c5c3ad2013-12-02 10:00:07 +0000207// RUN: -no-integrated-as -c %s 2>&1 \
208// RUN: | FileCheck -check-prefix=MIPS-MFP64 %s
Stephen Hines176edba2014-12-01 14:53:08 -0800209// MIPS-MFP64: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mfp64"
Daniel Sanders0d5d6ff2013-12-02 10:14:43 +0000210//
211// RUN: %clang -target mips-linux-gnu -mno-msa -mmsa -### \
212// RUN: -no-integrated-as -c %s 2>&1 \
213// RUN: | FileCheck -check-prefix=MIPS-MSA %s
Stephen Hines176edba2014-12-01 14:53:08 -0800214// MIPS-MSA: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mmsa"
Daniel Sanders0d5d6ff2013-12-02 10:14:43 +0000215//
216// RUN: %clang -target mips-linux-gnu -mmsa -mno-msa -### \
217// RUN: -no-integrated-as -c %s 2>&1 \
218// RUN: | FileCheck -check-prefix=MIPS-NMSA %s
219// MIPS-NMSA: as{{(.exe)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -0700220// MIPS-NMSA-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mmsa"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700221//
222// We've already tested MIPS32r2 and MIPS64r2 thoroughly. Do minimal tests on
223// the remaining CPU's since it was possible to pass on a -mabi with no value
224// when the CPU name is absent from a StringSwitch in getMipsCPUAndABI()
225// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips1 \
226// RUN: 2>&1 | FileCheck -check-prefix=MIPS1-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -0800227// MIPS1-EB-AS: as{{(.exe)?}}" "-march" "mips1" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700228// MIPS1-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
229//
230// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips2 \
231// RUN: 2>&1 | FileCheck -check-prefix=MIPS2-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -0800232// MIPS2-EB-AS: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700233// MIPS2-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
234//
235// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips3 \
236// RUN: 2>&1 | FileCheck -check-prefix=MIPS3-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -0800237// MIPS3-EB-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700238//
239// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips4 \
240// RUN: 2>&1 | FileCheck -check-prefix=MIPS4-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -0800241// MIPS4-EB-AS: as{{(.exe)?}}" "-march" "mips4" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700242//
243// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips5 \
244// RUN: 2>&1 | FileCheck -check-prefix=MIPS5-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -0800245// MIPS5-EB-AS: as{{(.exe)?}}" "-march" "mips5" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700246//
247// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips32 \
248// RUN: 2>&1 | FileCheck -check-prefix=MIPS32-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -0800249// MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700250// MIPS32-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
251//
252// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips32r6 \
253// RUN: 2>&1 | FileCheck -check-prefix=MIPS32R6-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -0800254// MIPS32R6-EB-AS: as{{(.exe)?}}" "-march" "mips32r6" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700255// MIPS32R6-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
256//
257// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips64 \
258// RUN: 2>&1 | FileCheck -check-prefix=MIPS64-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -0800259// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
Stephen Hinesc568f1e2014-07-21 00:47:37 -0700260//
261// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips64r6 \
262// RUN: 2>&1 | FileCheck -check-prefix=MIPS64R6-EB-AS %s
Stephen Hines176edba2014-12-01 14:53:08 -0800263// MIPS64R6-EB-AS: as{{(.exe)?}}" "-march" "mips64r6" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
264//
265// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -msoft-float -mhard-float -c %s 2>&1 \
266// RUN: | FileCheck -check-prefix=HARDFLOAT --implicit-check-not=-msoft-float %s
267// HARDFLOAT: as{{(.exe)?}}"
268// HARDFLOAT: -mhard-float
269//
270// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -mhard-float -msoft-float -c %s 2>&1 \
271// RUN: | FileCheck -check-prefix=SOFTFLOAT --implicit-check-not=-mhard-float %s
272// SOFTFLOAT: as{{(.exe)?}}"
273// SOFTFLOAT: -msoft-float
274//
275// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -mno-odd-spreg -modd-spreg -c %s 2>&1 \
276// RUN: | FileCheck -check-prefix=ODDSPREG --implicit-check-not=-mno-odd-spreg %s
277// ODDSPREG: as{{(.exe)?}}"
278// ODDSPREG: -modd-spreg
279//
280// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -modd-spreg -mno-odd-spreg -c %s 2>&1 \
281// RUN: | FileCheck -check-prefix=NOODDSPREG --implicit-check-not=-modd-spreg %s
282// NOODDSPREG: as{{(.exe)?}}"
283// NOODDSPREG: -mno-odd-spreg