gcc/testsuite/gcc.target/mips/r10k-cache-barrier-4.c
raw| 1 | /* { dg-options "-mr10k-cache-barrier=store -mno-abicalls" } */ |
| 2 | |
| 3 | void bar (int *x); |
| 4 | |
| 5 | /* Test that out-of-range stores to the frame are protected by cache |
| 6 | barriers. */ |
| 7 | |
| 8 | NOMIPS16 void |
| 9 | foo (int v) |
| 10 | { |
| 11 | int x[8]; |
| 12 | bar (x); |
| 13 | if (v & 1) |
| 14 | x[0x100] = 0; |
| 15 | if (v & 2) |
| 16 | x[-0x100] = 0; |
| 17 | bar (x); |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-assembler-times "\tcache\t" 2 } } */ |