1 // Test of the AArch64 values of -mtp=, checking that each one maps to
2 // the right target features.
4 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a 2>&1 | \
5 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL0 %s
6 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a -mtp=el0 2>&1 | \
7 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL0 %s
8 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a -mtp=tpidr_el0 2>&1 | \
9 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL0 %s
10 // ARMv8_THREAD_POINTER_EL0-NOT: "-target-feature" "+tpidrro-el0"
11 // ARMv8_THREAD_POINTER_EL0-NOT: "-target-feature" "+tpidr-el1"
12 // ARMv8_THREAD_POINTER_EL0-NOT: "-target-feature" "+tpidr-el2"
13 // ARMv8_THREAD_POINTER_EL0-NOT: "-target-feature" "+tpidr-el3"
15 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a -mtp=tpidrro_el0 2>&1 | \
16 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_ROEL0 %s
17 // ARMv8_THREAD_POINTER_ROEL0: "-target-feature" "+tpidrro-el0"
18 // ARMv8_THREAD_POINTER_ROEL0-NOT: "-target-feature" "+tpidr-el1"
19 // ARMv8_THREAD_POINTER_ROEL0-NOT: "-target-feature" "+tpidr-el2"
20 // ARMv8_THREAD_POINTER_ROEL0-NOT: "-target-feature" "+tpidr-el3"
22 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a -mtp=el1 2>&1 | \
23 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL1 %s
24 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a -mtp=tpidr_el1 2>&1 | \
25 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL1 %s
26 // ARMv8_THREAD_POINTER_EL1-NOT: "-target-feature" "+tpidrro-el0"
27 // ARMv8_THREAD_POINTER_EL1: "-target-feature" "+tpidr-el1"
28 // ARMv8_THREAD_POINTER_EL1-NOT: "-target-feature" "+tpidr-el2"
29 // ARMv8_THREAD_POINTER_EL1-NOT: "-target-feature" "+tpidr-el3"
31 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a -mtp=el2 2>&1 | \
32 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL2 %s
33 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a -mtp=tpidr_el2 2>&1 | \
34 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL2 %s
35 // ARMv8_THREAD_POINTER_EL2-NOT: "-target-feature" "+tpidrro-el0"
36 // ARMv8_THREAD_POINTER_EL2-NOT: "-target-feature" "+tpidr-el1"
37 // ARMv8_THREAD_POINTER_EL2: "-target-feature" "+tpidr-el2"
38 // ARMv8_THREAD_POINTER_EL2-NOT: "-target-feature" "+tpidr-el3"
40 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a -mtp=el3 2>&1 | \
41 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL3 %s
42 // RUN: %clang --target=aarch64-linux -### -S %s -arch armv8a -mtp=tpidr_el3 2>&1 | \
43 // RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL3 %s
44 // ARMv8_THREAD_POINTER_EL3-NOT: "-target-feature" "+tpidrro-el0"
45 // ARMv8_THREAD_POINTER_EL3-NOT: "-target-feature" "+tpidr-el1"
46 // ARMv8_THREAD_POINTER_EL3-NOT: "-target-feature" "+tpidr-el2"
47 // ARMv8_THREAD_POINTER_EL3: "-target-feature" "+tpidr-el3"