| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -mbranch-protection=pac-ret+leaf -fno-schedule-insns -fno-schedule-insns2" } */ |
| 3 |
/* { dg-final { check-function-bodies "**" "" "" } } */ |
| 4 |
|
| 5 |
/* |
| 6 |
**foo: |
| 7 |
** hint 25 // paciasp |
| 8 |
** ... |
| 9 |
** cbz w2, .* |
| 10 |
** mov x4, 0 |
| 11 |
** ... |
| 12 |
** cbz x4, .* |
| 13 |
** add sp, sp, x5 |
| 14 |
** br x6 |
| 15 |
** ( |
| 16 |
** hint 29 // autiasp |
| 17 |
** ret |
| 18 |
** | |
| 19 |
** retaa |
| 20 |
** ) |
| 21 |
** mov x5, x0 |
| 22 |
** mov x4, 1 |
| 23 |
** mov x6, x1 |
| 24 |
** b .* |
| 25 |
*/ |
| 26 |
void |
| 27 |
foo (unsigned long off, void *handler, int c) |
| 28 |
{ |
| 29 |
if (c) |
| 30 |
return; |
| 31 |
__builtin_eh_return (off, handler); |
| 32 |
} |