Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.target / mips / save-restore-3.c
bloba73e83b9fffd3be109d0e7ba70a91f39974e0d3a
1 /* Check that we can use the save instruction to save spilled arguments
2 when the argument save area is out of range of a direct load or store. */
3 /* { dg-do compile { target mips16_attribute } } */
4 /* { dg-mips-options "-mips32r2 -mabi=32 -O2" } */
5 /* { dg-add-options mips16_attribute } */
7 void bar (int *);
9 MIPS16 void
10 foo (int *a, int b, int c)
12 int x[0x4000];
13 asm volatile ("" ::: "$2", "$3", "$4", "$5", "$6", "$7", "$8",
14 "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$16",
15 "$18", "$19", "$20", "$21", "$22", "$23", "$24",
16 "$25", "$30", "memory");
17 bar (x);
18 a[b] = 1;
19 a[c] = 1;
21 /* { dg-final { scan-assembler "\tsave\t\\\$4-\\\$6," } } */
22 /* { dg-final { scan-assembler "\trestore\t" } } */