| 1 |
// RUN: %clang_cc1 -triple thumbv6m -verify -fsyntax-only %s |
| 2 |
|
| 3 |
// expected-no-diagnostics |
| 4 |
// Armv8.1-M.Main |
| 5 |
__attribute__((target("arch=cortex-m55,branch-protection=bti"))) void f1(void) {} |
| 6 |
__attribute__((target("arch=cortex-m55,branch-protection=pac-ret"))) void f2(void) {} |
| 7 |
__attribute__((target("arch=cortex-m55,branch-protection=bti+pac-ret"))) void f3(void) {} |
| 8 |
__attribute__((target("arch=cortex-m55,branch-protection=bti+pac-ret+leaf"))) void f4(void) {} |
| 9 |
// Armv8-M.Main |
| 10 |
__attribute__((target("arch=cortex-m33,branch-protection=bti"))) void f5(void) {} |
| 11 |
__attribute__((target("arch=cortex-m33,branch-protection=pac-ret"))) void f6(void) {} |
| 12 |
__attribute__((target("arch=cortex-m33,branch-protection=bti+pac-ret"))) void f7(void) {} |
| 13 |
__attribute__((target("arch=cortex-m33,branch-protection=bti+pac-ret+leaf"))) void f8(void) {} |
| 14 |
// Armv7-M |
| 15 |
__attribute__((target("arch=cortex-m3,branch-protection=bti"))) void f9(void) {} |
| 16 |
__attribute__((target("arch=cortex-m3,branch-protection=pac-ret"))) void f10(void) {} |
| 17 |
__attribute__((target("arch=cortex-m3,branch-protection=bti+pac-ret"))) void f11(void) {} |
| 18 |
__attribute__((target("arch=cortex-m3,branch-protection=bti+pac-ret+leaf"))) void f12(void) {} |
| 19 |
// Armv7E-M |
| 20 |
__attribute__((target("arch=cortex-m4,branch-protection=bti"))) void f13(void) {} |
| 21 |
__attribute__((target("arch=cortex-m4,branch-protection=pac-ret"))) void f14(void) {} |
| 22 |
__attribute__((target("arch=cortex-m4,branch-protection=bti+pac-ret"))) void f15(void) {} |
| 23 |
__attribute__((target("arch=cortex-m4,branch-protection=bti+pac-ret+leaf"))) void f16(void) {} |