| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector --param stack-clash-protection-guard-size=16" } */ |
| 3 |
/* { dg-skip-if "" { *-*-* } { "-g"} } */ |
| 4 |
/* { dg-require-effective-target supports_stack_clash_protection } */ |
| 5 |
|
| 6 |
typedef unsigned __attribute__((mode(DI))) uint64_t; |
| 7 |
|
| 8 |
extern void arf (uint64_t *, uint64_t *); |
| 9 |
void |
| 10 |
frob () |
| 11 |
{ |
| 12 |
uint64_t num[10000]; |
| 13 |
uint64_t den[10000]; |
| 14 |
arf (den, num); |
| 15 |
} |
| 16 |
|
| 17 |
/* This verifies that the scheduler did not break the dependencies |
| 18 |
by adjusting the offsets within the probe and that the scheduler |
| 19 |
did not reorder around the stack probes. */ |
| 20 |
/* { dg-final { scan-assembler-times "li\\tt0,65536" 1 } } */ |
| 21 |
/* { dg-final { scan-assembler-times "sub\\tsp,sp,t0\\n\\tsd\\tzero,1024\\(sp\\)" 2 } } */ |
| 22 |
/* There is some residual allocation, but we don't care about that. Only that it's not probed. */ |
| 23 |
/* { dg-final { scan-assembler-times "sd\\tzero," 2 } } */ |