Debian Codegraph @

clang/test/Driver/aarch64-features.c

raw
1 // RUN: %clang --target=aarch64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
2 // RUN: %clang --target=aarch64_be-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
3 // RUN: %clang --target=arm64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
4
5 // CHECK: "-funwind-tables=2"
6
7 // The AArch64 PCS states that chars should be unsigned.
8 // CHECK: fno-signed-char
9
10 // Check Function Multi Versioning option and rtlib dependency.
11 // RUN: %clang --target=aarch64-linux-android23 -rtlib=compiler-rt \
12 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV %s
13 // RUN: %clang --target=aarch64-linux-android -rtlib=compiler-rt \
14 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
15 // RUN: %clang --target=aarch64-linux-android -rtlib=compiler-rt -mno-fmv \
16 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
17 // RUN: %clang --target=aarch64-linux-android22 -rtlib=compiler-rt \
18 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
19
20 // RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \
21 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
22 // RUN: %clang --target=arm64-unknown-linux -rtlib=libgcc \
23 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
24
25 // CHECK-FMV-OFF: "-target-feature" "-fmv"
26 // CHECK-FMV-NOT: "-target-feature" "-fmv"
27
28 // Check for AArch64 out-of-line atomics default settings.
29 // RUN: %clang --target=aarch64-linux-android -rtlib=compiler-rt \
30 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
31
32 // RUN: %clang --target=aarch64-linux-gnu -rtlib=compiler-rt \
33 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
34
35 // RUN: %clang --target=arm64-unknown-linux -rtlib=compiler-rt \
36 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
37
38 // RUN: %clang --target=aarch64 -rtlib=compiler-rt \
39 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
40
41 // RUN: %clang --target=aarch64-apple-darwin -rtlib=compiler-rt \
42 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
43
44 // RUN: %clang --target=aarch64-windows-gnu -rtlib=compiler-rt \
45 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
46
47 // RUN: %clang --target=aarch64-unknown-openbsd -rtlib=compiler-rt \
48 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
49
50 // RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \
51 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-10 \
52 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
53
54 // RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \
55 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-7.5.0 \
56 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
57
58 // RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \
59 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-9.3.1 \
60 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
61
62 // RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \
63 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-9.3.0 \
64 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
65
66 // RUN: %clang --target=arm64-linux -rtlib=compiler-rt -mno-outline-atomics \
67 // RUN: -### -c %s 2>&1 | FileCheck \
68 // RUN: -check-prefixes=CHECK-OUTLINE-ATOMICS-OFF,CHECK-NO-OUTLINE-ATOMICS %s
69
70 // RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc -mno-outline-atomics \
71 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-10 \
72 // RUN: -### -c %s 2>&1 | FileCheck \
73 // RUN: -check-prefixes=CHECK-OUTLINE-ATOMICS-OFF,CHECK-NO-OUTLINE-ATOMICS %s
74
75 // RUN: %clang --target=aarch64-apple-darwin -rtlib=compiler-rt -moutline-atomics \
76 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
77
78 // RUN: %clang --target=aarch64-windows-gnu -rtlib=libgcc -moutline-atomics \
79 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-7.5.0 \
80 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
81
82 // CHECK-OUTLINE-ATOMICS-ON: "-target-feature" "+outline-atomics"
83 // CHECK-OUTLINE-ATOMICS-OFF-NOT: "-target-feature" "+outline-atomics"
84 // CHECK-NO-OUTLINE-ATOMICS: "-target-feature" "-outline-atomics"