Debian Codegraph @

gcc/testsuite/gcc.target/mips/mips16e2-cache.c

raw
1 /* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 -mips32r2 -mips16 -mmips16e2" } */
2 /* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
3
4 /* Test cache. */
5
6 void
7 test01 (int *area)
8 {
9 __builtin_mips_cache (20, area);
10 }
11
12 void
13 test02 (const short *area)
14 {
15 __builtin_mips_cache (24, area + 10);
16 }
17
18 void
19 test03 (volatile unsigned int *area, int offset)
20 {
21 __builtin_mips_cache (0, area + offset);
22 }
23
24 void
25 test04 (const volatile unsigned char *area)
26 {
27 __builtin_mips_cache (4, area - 80);
28 }
29
30 /* { dg-final { scan-assembler "\tcache\t0x14,0\\(\\\$4\\)" } } */
31 /* { dg-final { scan-assembler "\tcache\t0x18,20\\(\\\$4\\)" } } */
32 /* { dg-final { scan-assembler "\tcache\t(0x|)0,0\\(\\\$.\\)" } } */
33 /* { dg-final { scan-assembler "\tcache\t0x4,-80\\(\\\$4\\)" } } */
34