| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -mtune-ctrl=^prologue_using_move,^epilogue_using_move -fomit-frame-pointer -mnoreturn-no-callee-saved-registers" } */ |
| 3 |
|
| 4 |
typedef void (*fn_t) (void) __attribute__ ((no_callee_saved_registers)); |
| 5 |
extern void fn (void) __attribute__ ((noreturn)); |
| 6 |
|
| 7 |
__attribute__ ((noreturn)) |
| 8 |
void |
| 9 |
foo (fn_t bar) |
| 10 |
{ |
| 11 |
bar (); |
| 12 |
fn (); |
| 13 |
} |
| 14 |
|
| 15 |
/* { dg-final { scan-assembler-not "push\[^\n\r\]*(?:\[abcd\]x|\[sd\]i|sp|r\[0-9\]|\[xyz\]mm)" } } */ |
| 16 |
/* { dg-final { scan-assembler-not "pop\[^\n\r\]*(?:\[abcd\]x|\[sd\]i|sp|r\[0-9\]|\[xyz\]mm)" } } */ |
| 17 |
/* { dg-final { scan-assembler-not "jmp" } } */ |
| 18 |
/* { dg-final { scan-assembler "call\[\\t \]+" } } */ |