| 1 |
/* { dg-options "isa>=3" } */ |
| 2 |
/* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */ |
| 3 |
|
| 4 |
NOMIPS16 void |
| 5 |
f1 (int *area) |
| 6 |
{ |
| 7 |
__builtin_mips_cache (20, area); |
| 8 |
} |
| 9 |
|
| 10 |
NOMIPS16 void |
| 11 |
f2 (const short *area) |
| 12 |
{ |
| 13 |
__builtin_mips_cache (24, area + 10); |
| 14 |
} |
| 15 |
|
| 16 |
NOMIPS16 void |
| 17 |
f3 (volatile unsigned int *area, int offset) |
| 18 |
{ |
| 19 |
__builtin_mips_cache (0, area + offset); |
| 20 |
} |
| 21 |
|
| 22 |
NOMIPS16 void |
| 23 |
f4 (const volatile unsigned char *area) |
| 24 |
{ |
| 25 |
__builtin_mips_cache (4, area - 80); |
| 26 |
} |
| 27 |
|
| 28 |
/* { dg-final { scan-assembler "\tcache\t0x14,0\\(\\\$4\\)" } } */ |
| 29 |
/* { dg-final { scan-assembler "\tcache\t0x18,20\\(\\\$4\\)" } } */ |
| 30 |
/* { dg-final { scan-assembler "\tcache\t(0x|)0,0\\(\\\$.\\)" } } */ |
| 31 |
/* { dg-final { scan-assembler "\tcache\t0x4,-80\\(\\\$4\\)" } } */ |