• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // REQUIRES: mips-registered-target
2 //
3 // Check passing options to the assembler for MIPS targets.
4 //
5 // RUN: %clang -target mips-linux-gnu -### \
6 // RUN:   -no-integrated-as -c %s 2>&1 \
7 // RUN:   | FileCheck -check-prefix=MIPS32-EB-AS %s
8 // MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
9 // MIPS32-EB-AS-NOT: "-KPIC"
10 //
11 // RUN: %clang -target mips-linux-gnu -### \
12 // RUN:   -no-integrated-as -fPIC -c %s 2>&1 \
13 // RUN:   | FileCheck -check-prefix=MIPS32-EB-PIC %s
14 // MIPS32-EB-PIC: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
15 // MIPS32-EB-PIC: "-KPIC"
16 //
17 // RUN: %clang -target mipsel-linux-gnu -### \
18 // RUN:   -no-integrated-as -c %s 2>&1 \
19 // RUN:   | FileCheck -check-prefix=MIPS32-DEF-EL-AS %s
20 // MIPS32-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EL"
21 //
22 // RUN: %clang -target mips64-linux-gnu -### \
23 // RUN:   -no-integrated-as -c %s 2>&1 \
24 // RUN:   | FileCheck -check-prefix=MIPS64-EB-AS %s
25 // MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
26 //
27 // RUN: %clang -target mips64el-linux-gnu -### \
28 // RUN:   -no-integrated-as -c %s 2>&1 \
29 // RUN:   | FileCheck -check-prefix=MIPS64-DEF-EL-AS %s
30 // MIPS64-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EL"
31 //
32 // RUN: %clang -target mips-linux-gnu -mabi=eabi -### \
33 // RUN:   -no-integrated-as -c %s 2>&1 \
34 // RUN:   | FileCheck -check-prefix=MIPS-EABI %s
35 // MIPS-EABI: as{{(.exe)?}}" "-march" "mips32" "-mabi" "eabi" "-EB"
36 //
37 // RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \
38 // RUN:   -no-integrated-as -c %s 2>&1 \
39 // RUN:   | FileCheck -check-prefix=MIPS-N32 %s
40 // MIPS-N32: as{{(.exe)?}}" "-march" "mips64" "-mabi" "n32" "-EB"
41 //
42 // RUN: %clang -target mipsel-linux-gnu -mabi=32 -### \
43 // RUN:   -no-integrated-as -c %s 2>&1 \
44 // RUN:   | FileCheck -check-prefix=MIPS32-EL-AS %s
45 // MIPS32-EL-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EL"
46 //
47 // RUN: %clang -target mips64el-linux-gnu -mabi=64 -### \
48 // RUN:   -no-integrated-as -c %s 2>&1 \
49 // RUN:   | FileCheck -check-prefix=MIPS64-EL-AS %s
50 // MIPS64-EL-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EL"
51 //
52 // RUN: %clang -target mips-linux-gnu -march=mips32r2 -### \
53 // RUN:   -no-integrated-as -c %s 2>&1 \
54 // RUN:   | FileCheck -check-prefix=MIPS-32R2 %s
55 // MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
56 //
57 // RUN: %clang -target mips-linux-gnu -mips32 -### \
58 // RUN:   -no-integrated-as -c %s 2>&1 \
59 // RUN:   | FileCheck -check-prefix=MIPS-ALIAS-32 %s
60 // MIPS-ALIAS-32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
61 //
62 // RUN: %clang -target mips-linux-gnu -mips32r2 -### \
63 // RUN:   -no-integrated-as -c %s 2>&1 \
64 // RUN:   | FileCheck -check-prefix=MIPS-ALIAS-32R2 %s
65 // MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
66 //
67 // RUN: %clang -target mips-linux-gnu -mips64 -### \
68 // RUN:   -no-integrated-as -c %s 2>&1 \
69 // RUN:   | FileCheck -check-prefix=MIPS-ALIAS-64 %s
70 // MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
71 //
72 // RUN: %clang -target mips-linux-gnu -mips64r2 -### \
73 // RUN:   -no-integrated-as -c %s 2>&1 \
74 // RUN:   | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s
75 // MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
76