2012-09-06 05:50:35 +08:00
|
|
|
// Check passing options to the assembler for MIPS targets.
|
|
|
|
//
|
|
|
|
// RUN: %clang -target mips-unknown-freebsd -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS32-EB-AS %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB"
|
2012-09-06 05:50:35 +08:00
|
|
|
// MIPS32-EB-AS-NOT: "-KPIC"
|
|
|
|
//
|
|
|
|
// RUN: %clang -target mips-unknown-freebsd -### \
|
|
|
|
// RUN: -no-integrated-as -fPIC -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIC %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS32-EB-PIC: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB"
|
2012-09-06 05:50:35 +08:00
|
|
|
// MIPS32-EB-PIC: "-KPIC"
|
|
|
|
//
|
|
|
|
// RUN: %clang -target mips-unknown-freebsd -### \
|
|
|
|
// RUN: -no-integrated-as -fpic -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIC-SMALL %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS32-EB-PIC-SMALL: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB"
|
2012-09-06 05:50:35 +08:00
|
|
|
// MIPS32-EB-PIC-SMALL: "-KPIC"
|
|
|
|
//
|
|
|
|
// RUN: %clang -target mips-unknown-freebsd -### \
|
|
|
|
// RUN: -no-integrated-as -fPIE -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIE %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS32-EB-PIE: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB"
|
2012-09-06 05:50:35 +08:00
|
|
|
// MIPS32-EB-PIE: "-KPIC"
|
|
|
|
//
|
|
|
|
// RUN: %clang -target mips-unknown-freebsd -### \
|
|
|
|
// RUN: -no-integrated-as -fpie -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIE-SMALL %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS32-EB-PIE-SMALL: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB"
|
2012-09-06 05:50:35 +08:00
|
|
|
// MIPS32-EB-PIE-SMALL: "-KPIC"
|
|
|
|
//
|
|
|
|
// RUN: %clang -target mipsel-unknown-freebsd -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
2013-02-27 22:55:49 +08:00
|
|
|
// RUN: | FileCheck -check-prefix=MIPS32-DEF-EL-AS %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS32-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EL"
|
2012-09-06 05:50:35 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -target mips64-unknown-freebsd -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS64-EB-AS %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-EB"
|
2012-09-06 05:50:35 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -target mips64el-unknown-freebsd -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
2013-02-27 22:55:49 +08:00
|
|
|
// RUN: | FileCheck -check-prefix=MIPS64-DEF-EL-AS %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS64-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-EL"
|
2012-09-06 05:50:35 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -target mips64-unknown-freebsd -mabi=n32 -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS-N32 %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS-N32: as{{(.exe)?}}" "-march" "mips3" "-mabi" "n32" "-EB"
|
2012-09-10 16:32:41 +08:00
|
|
|
//
|
2013-02-27 22:55:49 +08:00
|
|
|
// RUN: %clang -target mipsel-unknown-freebsd -mabi=32 -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS32-EL-AS %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS32-EL-AS: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EL"
|
2013-02-27 22:55:49 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -target mips64el-unknown-freebsd -mabi=64 -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS64-EL-AS %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS64-EL-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-EL"
|
2013-02-27 22:55:49 +08:00
|
|
|
//
|
2012-09-10 16:32:41 +08:00
|
|
|
// RUN: %clang -target mips-linux-freebsd -march=mips32r2 -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS-32R2 %s
|
|
|
|
// MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
|
2012-09-22 04:19:32 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -target mips-unknown-freebsd -mips32 -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32 %s
|
|
|
|
// MIPS-ALIAS-32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
|
|
|
|
//
|
|
|
|
// RUN: %clang -target mips-unknown-freebsd -mips32r2 -### \
|
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R2 %s
|
|
|
|
// MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
|
|
|
|
//
|
2014-06-30 16:10:01 +08:00
|
|
|
// RUN: %clang -target mips64-unknown-freebsd -mips64 -### \
|
2012-09-22 04:19:32 +08:00
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64 %s
|
|
|
|
// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
|
|
|
|
//
|
2014-06-30 16:10:01 +08:00
|
|
|
// RUN: %clang -target mips64-unknown-freebsd -mips64r2 -### \
|
2012-09-22 04:19:32 +08:00
|
|
|
// RUN: -no-integrated-as -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s
|
|
|
|
// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
|
On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler.
Summary:
See also:
https://sourceware.org/binutils/docs/as/MIPS-Options.html#index-g_t_0040code_007b_002dG_007d-option-_0028MIPS_0029-1392
Reviewers: theraven, atanasyan, brooks, emaste
Subscribers: rnk, emaste, cfe-commits, seanbruno, dim
Differential Revision: http://reviews.llvm.org/D10137
llvm-svn: 256468
2015-12-27 18:36:44 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -target mips-unknown-freebsd -### \
|
|
|
|
// RUN: -no-integrated-as -G0 -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=MIPS32-EB-AS-G0 %s
|
2018-06-27 03:48:05 +08:00
|
|
|
// MIPS32-EB-AS-G0: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB" "-G0"
|
On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler.
Summary:
See also:
https://sourceware.org/binutils/docs/as/MIPS-Options.html#index-g_t_0040code_007b_002dG_007d-option-_0028MIPS_0029-1392
Reviewers: theraven, atanasyan, brooks, emaste
Subscribers: rnk, emaste, cfe-commits, seanbruno, dim
Differential Revision: http://reviews.llvm.org/D10137
llvm-svn: 256468
2015-12-27 18:36:44 +08:00
|
|
|
// MIPS32-EB-AS-G0-NOT: "-KPIC"
|