blob: c825ee78b751120b914b30c81332f49e7d67162c [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 \
5// RUN: | FileCheck -check-prefix=MIPS32-EB-AS %s
Stephen Hines651f13c2014-04-23 16:59:28 -07006// MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
7// MIPS32-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
Simon Atanasyan1f0646e2012-05-29 19:07:33 +00008//
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
Stephen Hines651f13c2014-04-23 16:59:28 -070012// MIPS32-EB-PIC: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
Simon Atanasyan125aa1f2012-07-05 11:30:19 +000013// MIPS32-EB-PIC: "-KPIC"
Simon Atanasyan5f0a1c12012-04-06 19:15:24 +000014//
15// RUN: %clang -target mipsel-linux-gnu -### \
16// RUN: -no-integrated-as -c %s 2>&1 \
Simon Atanasyane9616a42013-02-27 14:55:49 +000017// RUN: | FileCheck -check-prefix=MIPS32-DEF-EL-AS %s
Stephen Hines651f13c2014-04-23 16:59:28 -070018// MIPS32-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EL"
Simon Atanasyan5f0a1c12012-04-06 19:15:24 +000019//
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
Stephen Hines651f13c2014-04-23 16:59:28 -070023// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
Simon Atanasyan5f0a1c12012-04-06 19:15:24 +000024//
25// RUN: %clang -target mips64el-linux-gnu -### \
26// RUN: -no-integrated-as -c %s 2>&1 \
Simon Atanasyane9616a42013-02-27 14:55:49 +000027// RUN: | FileCheck -check-prefix=MIPS64-DEF-EL-AS %s
Stephen Hines651f13c2014-04-23 16:59:28 -070028// MIPS64-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL"
Simon Atanasyan073a7802012-04-07 22:31:29 +000029//
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
Stephen Hines651f13c2014-04-23 16:59:28 -070033// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "eabi" "-EB"
Simon Atanasyan073a7802012-04-07 22:31:29 +000034//
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
Stephen Hines651f13c2014-04-23 16:59:28 -070038// MIPS-N32: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-EB"
Simon Atanasyan89d83ff2012-09-10 08:32:41 +000039//
Simon Atanasyane9616a42013-02-27 14:55:49 +000040// 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
Stephen Hines651f13c2014-04-23 16:59:28 -070043// MIPS32-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EL"
Simon Atanasyane9616a42013-02-27 14:55:49 +000044//
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
Stephen Hines651f13c2014-04-23 16:59:28 -070048// MIPS64-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL"
Simon Atanasyane9616a42013-02-27 14:55:49 +000049//
Simon Atanasyan89d83ff2012-09-10 08:32:41 +000050// 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"
Simon Atanasyan8e1c5982012-09-21 20:19:32 +000054//
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"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +000074//
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
Stephen Hines651f13c2014-04-23 16:59:28 -070078// MIPS-16: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mips16"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +000079//
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)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -070084// MIPS-N16-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mips16"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +000085//
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
Stephen Hines651f13c2014-04-23 16:59:28 -070089// MIPS-MICRO: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mmicromips"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +000090//
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)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -070095// MIPS-NMICRO-NOT: {{[A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mmicromips"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +000096//
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
Stephen Hines651f13c2014-04-23 16:59:28 -0700100// MIPS-DSP: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mdsp"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000101//
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)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -0700106// MIPS-NDSP-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mdsp"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000107//
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
Stephen Hines651f13c2014-04-23 16:59:28 -0700111// MIPS-DSPR2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mdspr2"
Simon Atanasyan9dbfc612013-04-30 07:47:13 +0000112//
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)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -0700117// MIPS-NDSPR2-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mdspr2"
Simon Atanasyanfc12c4a2013-09-24 09:09:16 +0000118//
119// RUN: %clang -target mips-linux-gnu -mnan=legacy -mnan=2008 -### \
120// RUN: -no-integrated-as -c %s 2>&1 \
121// RUN: | FileCheck -check-prefix=MIPS-NAN2008 %s
Stephen Hines651f13c2014-04-23 16:59:28 -0700122// MIPS-NAN2008: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mnan=2008"
Simon Atanasyanfc12c4a2013-09-24 09:09:16 +0000123//
124// RUN: %clang -target mips-linux-gnu -mnan=2008 -mnan=legacy -### \
125// RUN: -no-integrated-as -c %s 2>&1 \
126// RUN: | FileCheck -check-prefix=MIPS-NAN-LEGACY %s
127// MIPS-NAN-LEGACY: as{{(.exe)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -0700128// MIPS-NAN-LEGACY-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mnan={{.*}}"
Daniel Sanders6c5c3ad2013-12-02 10:00:07 +0000129//
130// RUN: %clang -target mips-linux-gnu -mfp64 -mfp32 -### \
131// RUN: -no-integrated-as -c %s 2>&1 \
132// RUN: | FileCheck -check-prefix=MIPS-MFP32 %s
Stephen Hines651f13c2014-04-23 16:59:28 -0700133// MIPS-MFP32: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mfp32"
Daniel Sanders6c5c3ad2013-12-02 10:00:07 +0000134//
135// RUN: %clang -target mips-linux-gnu -mfp32 -mfp64 -### \
136// RUN: -no-integrated-as -c %s 2>&1 \
137// RUN: | FileCheck -check-prefix=MIPS-MFP64 %s
Stephen Hines651f13c2014-04-23 16:59:28 -0700138// MIPS-MFP64: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mfp64"
Daniel Sanders0d5d6ff2013-12-02 10:14:43 +0000139//
140// RUN: %clang -target mips-linux-gnu -mno-msa -mmsa -### \
141// RUN: -no-integrated-as -c %s 2>&1 \
142// RUN: | FileCheck -check-prefix=MIPS-MSA %s
Stephen Hines651f13c2014-04-23 16:59:28 -0700143// MIPS-MSA: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mmsa"
Daniel Sanders0d5d6ff2013-12-02 10:14:43 +0000144//
145// RUN: %clang -target mips-linux-gnu -mmsa -mno-msa -### \
146// RUN: -no-integrated-as -c %s 2>&1 \
147// RUN: | FileCheck -check-prefix=MIPS-NMSA %s
148// MIPS-NMSA: as{{(.exe)?}}"
Stephen Hines651f13c2014-04-23 16:59:28 -0700149// MIPS-NMSA-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mmsa"