xref: /minix3/external/bsd/llvm/dist/clang/test/Driver/linux-as.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1 // Check passing options to the assembler for various linux targets.
2 //
3 // RUN: %clang -target arm-linux -### \
4 // RUN:   -no-integrated-as -c %s 2>&1 \
5 // RUN:   | FileCheck -check-prefix=CHECK-ARM %s
6 // CHECK-ARM: as{{(.exe)?}}" "-mfloat-abi=soft"
7 //
8 // RUN: %clang -target arm-linux -mcpu=cortex-a8 -### \
9 // RUN:   -no-integrated-as -c %s 2>&1 \
10 // RUN:   | FileCheck -check-prefix=CHECK-ARM-MCPU %s
11 // CHECK-ARM-MCPU: as{{(.exe)?}}" "-mfloat-abi=soft" "-mcpu=cortex-a8"
12 //
13 // RUN: %clang -target arm-linux -mfpu=neon -### \
14 // RUN:   -no-integrated-as -c %s 2>&1 \
15 // RUN:   | FileCheck -check-prefix=CHECK-ARM-MFPU %s
16 // CHECK-ARM-MFPU: as{{(.exe)?}}" "-mfloat-abi=soft" "-mfpu=neon"
17 //
18 // RUN: %clang -target arm-linux -march=armv7-a -### \
19 // RUN:   -no-integrated-as -c %s 2>&1 \
20 // RUN:   | FileCheck -check-prefix=CHECK-ARM-MARCH %s
21 // CHECK-ARM-MARCH: as{{(.exe)?}}" "-mfloat-abi=soft" "-march=armv7-a"
22 //
23 // RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \
24 // RUN:   -no-integrated-as -c %s 2>&1 \
25 // RUN:   | FileCheck -check-prefix=CHECK-ARM-ALL %s
26 // CHECK-ARM-ALL: as{{(.exe)?}}" "-mfloat-abi=soft" "-march=armv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
27 //
28 // RUN: %clang -target armv7-linux -mcpu=cortex-a8 -### \
29 // RUN:   -no-integrated-as -c %s 2>&1 \
30 // RUN:   | FileCheck -check-prefix=CHECK-ARM-TARGET %s
31 // CHECK-ARM-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
32 //
33 // RUN: %clang -target armv8-linux -mcpu=cortex-a53 -### \
34 // RUN:   -no-integrated-as -c %s 2>&1 \
35 // RUN:   | FileCheck -check-prefix=CHECK-ARM-TARGET-V8 %s
36 // CHECK-ARM-TARGET-V8: as{{(.exe)?}}" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
37 //
38 // RUN: %clang -target arm-linux -mfloat-abi=hard -### \
39 // RUN:   -no-integrated-as -c %s 2>&1 \
40 // RUN:   | FileCheck -check-prefix=CHECK-ARM-MFLOAT-ABI %s
41 // CHECK-ARM-MFLOAT-ABI: as{{(.exe)?}}" "-mfloat-abi=hard"
42 //
43 // RUN: %clang -target arm-linux-androideabi -### \
44 // RUN:   -no-integrated-as -c %s 2>&1 \
45 // RUN:   | FileCheck -check-prefix=CHECK-ARM-ANDROID %s
46 // CHECK-ARM-ANDROID: as{{(.exe)?}}" "-mfloat-abi=soft"
47 //
48 // RUN: %clang -target arm-linux-androideabi -march=armv7-a -### \
49 // RUN:   -no-integrated-as -c %s 2>&1 \
50 // RUN:   | FileCheck -check-prefix=CHECK-ARM-ANDROID-SOFTFP %s
51 // CHECK-ARM-ANDROID-SOFTFP: as{{(.exe)?}}" "-mfloat-abi=softfp" "-march=armv7-a"
52 //
53 // RUN: %clang -target arm-linux-eabi -mhard-float -### \
54 // RUN:   -no-integrated-as -c %s 2>&1 \
55 // RUN:   | FileCheck -check-prefix=CHECK-ARM-HARDFP %s
56 // CHECK-ARM-HARDFP: as{{(.exe)?}}" "-mfloat-abi=hard"
57 //
58 // RUN: %clang -target ppc-linux -mcpu=invalid-cpu -### \
59 // RUN:   -no-integrated-as -c %s 2>&1 \
60 // RUN:   | FileCheck -check-prefix=CHECK-PPC-NO-MCPU %s
61 // CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu"
62 //
63 // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
64 // RUN:   -no-integrated-as -c %s 2>&1 \
65 // RUN:   | FileCheck -check-prefix=CHECK-SPARCV9 %s
66 // CHECK-SPARCV9: as
67 // CHECK-SPARCV9: -64
68 // CHECK-SPARCV9: -Av9a
69 // CHECK-SPARCV9-NOT: -KPIC
70 // CHECK-SPARCV9: -o
71 //
72 // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
73 // RUN:   -no-integrated-as -fpic -c %s 2>&1 \
74 // RUN:   | FileCheck -check-prefix=CHECK-SPARCV9PIC %s
75 // CHECK-SPARCV9PIC: as
76 // CHECK-SPARCV9PIC: -64
77 // CHECK-SPARCV9PIC: -Av9a
78 // CHECK-SPARCV9PIC: -KPIC
79 // CHECK-SPARCV9PIC: -o
80 //
81 // RUN: %clang -target sparc-linux -mcpu=invalid-cpu -### \
82 // RUN:   -no-integrated-as -c %s 2>&1 \
83 // RUN:   | FileCheck -check-prefix=CHECK-SPARCV8 %s
84 // CHECK-SPARCV8: as
85 // CHECK-SPARCV8: -32
86 // CHECK-SPARCV8: -Av8plusa
87 // CHECK-SPARCV8: -o
88 //
89 // RUN: %clang -target s390x-linux -### -no-integrated-as -c %s 2>&1 \
90 // RUN:   | FileCheck -check-prefix=CHECK-Z-DEFAULT-ARCH %s
91 // CHECK-Z-DEFAULT-ARCH: as{{.*}} "-march=z10"
92 //
93 // RUN: %clang -target s390x-linux -march=z196 -### \
94 // RUN:   -no-integrated-as -c %s 2>&1 \
95 // RUN:   | FileCheck -check-prefix=CHECK-Z-ARCH-Z196 %s
96 // CHECK-Z-ARCH-Z196: as{{.*}} "-march=z196"
97