| 1 |
// Check passing options to the assembler for MIPS targets. |
| 2 |
// |
| 3 |
// RUN: %clang --target=mips-unknown-freebsd -### \ |
| 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" "mips2" "-mabi" "32" "-EB" |
| 7 |
// MIPS32-EB-AS-NOT: "-KPIC" |
| 8 |
// |
| 9 |
// RUN: %clang --target=mips-unknown-freebsd -### \ |
| 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" "mips2" "-mabi" "32" "-EB" |
| 13 |
// MIPS32-EB-PIC: "-KPIC" |
| 14 |
// |
| 15 |
// RUN: %clang --target=mips-unknown-freebsd -### \ |
| 16 |
// RUN: -no-integrated-as -fpic -c %s 2>&1 \ |
| 17 |
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIC-SMALL %s |
| 18 |
// MIPS32-EB-PIC-SMALL: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB" |
| 19 |
// MIPS32-EB-PIC-SMALL: "-KPIC" |
| 20 |
// |
| 21 |
// RUN: %clang --target=mips-unknown-freebsd -### \ |
| 22 |
// RUN: -no-integrated-as -fPIE -c %s 2>&1 \ |
| 23 |
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIE %s |
| 24 |
// MIPS32-EB-PIE: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB" |
| 25 |
// MIPS32-EB-PIE: "-KPIC" |
| 26 |
// |
| 27 |
// RUN: %clang --target=mips-unknown-freebsd -### \ |
| 28 |
// RUN: -no-integrated-as -fpie -c %s 2>&1 \ |
| 29 |
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIE-SMALL %s |
| 30 |
// MIPS32-EB-PIE-SMALL: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB" |
| 31 |
// MIPS32-EB-PIE-SMALL: "-KPIC" |
| 32 |
// |
| 33 |
// RUN: %clang --target=mipsel-unknown-freebsd -### \ |
| 34 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 35 |
// RUN: | FileCheck -check-prefix=MIPS32-DEF-EL-AS %s |
| 36 |
// MIPS32-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EL" |
| 37 |
// |
| 38 |
// RUN: %clang --target=mips64-unknown-freebsd -### \ |
| 39 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 40 |
// RUN: | FileCheck -check-prefix=MIPS64-EB-AS %s |
| 41 |
// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-EB" |
| 42 |
// |
| 43 |
// RUN: %clang --target=mips64el-unknown-freebsd -### \ |
| 44 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 45 |
// RUN: | FileCheck -check-prefix=MIPS64-DEF-EL-AS %s |
| 46 |
// MIPS64-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-EL" |
| 47 |
// |
| 48 |
// RUN: %clang --target=mips64-unknown-freebsd -mabi=n32 -### \ |
| 49 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 50 |
// RUN: | FileCheck -check-prefix=MIPS-N32 %s |
| 51 |
// MIPS-N32: as{{(.exe)?}}" "-march" "mips3" "-mabi" "n32" "-EB" |
| 52 |
// |
| 53 |
// RUN: %clang --target=mipsel-unknown-freebsd -mabi=32 -### \ |
| 54 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 55 |
// RUN: | FileCheck -check-prefix=MIPS32-EL-AS %s |
| 56 |
// MIPS32-EL-AS: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EL" |
| 57 |
// |
| 58 |
// RUN: %clang --target=mips64el-unknown-freebsd -mabi=64 -### \ |
| 59 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 60 |
// RUN: | FileCheck -check-prefix=MIPS64-EL-AS %s |
| 61 |
// MIPS64-EL-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-EL" |
| 62 |
// |
| 63 |
// RUN: %clang --target=mips-linux-freebsd -march=mips32r2 -### \ |
| 64 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 65 |
// RUN: | FileCheck -check-prefix=MIPS-32R2 %s |
| 66 |
// MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" |
| 67 |
// |
| 68 |
// RUN: %clang --target=mips-unknown-freebsd -mips32 -### \ |
| 69 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 70 |
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32 %s |
| 71 |
// MIPS-ALIAS-32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" |
| 72 |
// |
| 73 |
// RUN: %clang --target=mips-unknown-freebsd -mips32r2 -### \ |
| 74 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 75 |
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R2 %s |
| 76 |
// MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" |
| 77 |
// |
| 78 |
// RUN: %clang --target=mips64-unknown-freebsd -mips64 -### \ |
| 79 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 80 |
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64 %s |
| 81 |
// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB" |
| 82 |
// |
| 83 |
// RUN: %clang --target=mips64-unknown-freebsd -mips64r2 -### \ |
| 84 |
// RUN: -no-integrated-as -c %s 2>&1 \ |
| 85 |
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s |
| 86 |
// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB" |
| 87 |
// |
| 88 |
// RUN: %clang --target=mips-unknown-freebsd -### \ |
| 89 |
// RUN: -no-integrated-as -G0 -c %s 2>&1 \ |
| 90 |
// RUN: | FileCheck -check-prefix=MIPS32-EB-AS-G0 %s |
| 91 |
// MIPS32-EB-AS-G0: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB" "-G0" |
| 92 |
// MIPS32-EB-AS-G0-NOT: "-KPIC" |