48 lines · c
1// Test of the AArch64 values of -mtp=, checking that each one maps to2// the right target features.3 4// RUN: %clang --target=aarch64-linux -### -S %s 2>&1 | \5// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL0 %s6// RUN: %clang --target=aarch64-linux -### -S %s -mtp=el0 2>&1 | \7// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL0 %s8// RUN: %clang --target=aarch64-linux -### -S %s -mtp=tpidr_el0 2>&1 | \9// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL0 %s10// 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"14 15// RUN: %clang --target=aarch64-linux -### -S %s -mtp=tpidrro_el0 2>&1 | \16// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_ROEL0 %s17// 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"21 22// RUN: %clang --target=aarch64-linux -### -S %s -mtp=el1 2>&1 | \23// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL1 %s24// RUN: %clang --target=aarch64-linux -### -S %s -mtp=tpidr_el1 2>&1 | \25// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL1 %s26// 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"30 31// RUN: %clang --target=aarch64-linux -### -S %s -mtp=el2 2>&1 | \32// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL2 %s33// RUN: %clang --target=aarch64-linux -### -S %s -mtp=tpidr_el2 2>&1 | \34// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL2 %s35// 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"39 40// RUN: %clang --target=aarch64-linux -### -S %s -mtp=el3 2>&1 | \41// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL3 %s42// RUN: %clang --target=aarch64-linux -### -S %s -mtp=tpidr_el3 2>&1 | \43// RUN: FileCheck -check-prefix=ARMv8_THREAD_POINTER_EL3 %s44// 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"48