| 1 |
/* Testing return address signing. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */ |
| 4 |
/* { dg-require-effective-target mbranch_protection_ok } */ |
| 5 |
/* { dg-options "-mbranch-protection=pac-ret+leaf -mfloat-abi=hard --save-temps -O0" } */ |
| 6 |
/* { dg-add-options arm_arch_v8_1m_main_pacbti } */ |
| 7 |
|
| 8 |
#include "pac.h" |
| 9 |
|
| 10 |
/* { dg-final { scan-assembler-times "\tpac\tip, lr, sp" 2 } } */ |
| 11 |
/* { dg-final { scan-assembler-times "\taut\tip, lr, sp" 2 } } */ |
| 12 |
/* { dg-final { scan-assembler-not "\tbti" } } */ |
| 13 |
|