OSDN Git Service

* gcc.target/mips/octeon-exts-2.c: Compile it with -meb.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / mips / save-restore-3.c
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 } */
6
7 void bar (int *);
8
9 MIPS16 void
10 foo (int *a, int b, int c)
11 {
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;
20 }
21 /* { dg-final { scan-assembler "\tsave\t\\\$4-\\\$6," } } */
22 /* { dg-final { scan-assembler "\trestore\t" } } */