Debian Codegraph @

clang/test/Driver/mips-cpu64abi32.c

raw
1 /// Check handling the CPU is 64bit while ABI is O32.
2 /// when build for MIPS platforms.
3
4 /// abi-n32
5 // RUN: %clang -### -c %s --target=mips-linux-gnu -mabi=n32 2>&1 \
6 // RUN: | FileCheck --check-prefix=CHECK-ABI-N32 %s
7 // CHECK-ABI-N32: "-target-abi" "n32"
8
9 /// abi-64
10 // RUN: %clang -### -c %s --target=mips-linux-gnu -mabi=64 2>&1 \
11 // RUN: | FileCheck --check-prefix=CHECK-ABI-64 %s
12 // CHECK-ABI-64: "-target-abi" "n64"
13
14
15 /// -march=mips3
16 // RUN: %clang -### -c %s --target=mips-linux-gnu -march=mips3 2>&1 \
17 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPS3 %s
18 // CHECK-MIPS-MIPS3: "-target-cpu" "mips3" {{.*}} "-target-abi" "o32"
19
20 /// -march=mips4
21 // RUN: %clang -### -c %s --target=mips-linux-gnu -march=mips4 2>&1 \
22 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPS4 %s
23 // CHECK-MIPS-MIPS4: "-target-cpu" "mips4" {{.*}} "-target-abi" "o32"
24
25 /// FIXME: MIPS V is not implemented yet.
26
27 /// -march=mips64
28 /// RUN: %clang -### -c %s --target=mips-linux-gnu -march=mips64 2>&1 \
29 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPS64 %s
30 // CHECK-MIPS-MIPS64: "-target-cpu" "mips64" {{.*}} "-target-abi" "o32"
31
32 /// -march=mips64r2
33 /// RUN: %clang -### -c %s --target=mips-linux-gnu -march=mips64r2 2>&1 \
34 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPS64R2 %s
35 // CHECK-MIPS-MIPS64R2: "-target-cpu" "mips64r2" {{.*}} "-target-abi" "o32"
36
37 /// -march=mips64r6
38 // RUN: %clang -### -c %s --target=mips-linux-gnu -march=mips64r6 2>&1 \
39 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPS64R6 %s
40 // CHECK-MIPS-MIPS64R6: "-target-cpu" "mips64r6" {{.*}} "-target-abi" "o32"
41
42
43 /// mipsisa3
44 // RUN: %clang -### -c %s --target=mips64-linux-gnu -march=mips3 -mabi=32 2>&1 \
45 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPSISA3 %s
46 // CHECK-MIPS-MIPSISA3: "-target-cpu" "mips3" {{.*}} "-target-abi" "o32"
47
48 /// mipsisa4
49 // RUN: %clang -### -c %s --target=mips64-linux-gnu -march=mips4 -mabi=32 2>&1 \
50 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPSISA4 %s
51 // CHECK-MIPS-MIPSISA4: "-target-cpu" "mips4" {{.*}} "-target-abi" "o32"
52
53 /// FIXME: MIPS V is not implemented yet.
54
55 /// mipsisa64
56 // RUN: %clang -### -c %s --target=mips64-linux-gnu -march=mips64 -mabi=32 2>&1 \
57 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPSISA64 %s
58 // CHECK-MIPS-MIPSISA64: "-target-cpu" "mips64" {{.*}} "-target-abi" "o32"
59
60 /// mipsisa64r2
61 // RUN: %clang -### -c %s --target=mips64-linux-gnu -march=mips64r2 -mabi=32 2>&1 \
62 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPSISA64R2 %s
63 // CHECK-MIPS-MIPSISA64R2: "-target-cpu" "mips64r2" {{.*}} "-target-abi" "o32"
64
65 /// mipsisa64r6
66 // RUN: %clang -### -c %s --target=mips64-linux-gnu -march=mips64r6 -mabi=32 2>&1 \
67 // RUN: | FileCheck --check-prefix=CHECK-MIPS-MIPSISA64R6 %s
68 // CHECK-MIPS-MIPSISA64R6: "-target-cpu" "mips64r6" {{.*}} "-target-abi" "o32"