Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / mips / r10k-cache-barrier-4.c
blob7780460b2d05d7eac59fd47b0668c955ba7338c6
1 /* { dg-options "-mr10k-cache-barrier=store -mno-abicalls" } */
3 void bar (int *x);
5 /* Test that out-of-range stores to the frame are protected by cache
6 barriers. */
8 NOMIPS16 void
9 foo (int v)
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);
20 /* { dg-final { scan-assembler-times "\tcache\t" 2 } } */