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-2.c
1 /* Check that we can use the save instruction to save spilled arguments.  */
2 /* { dg-do compile { target mips16_attribute } } */
3 /* { dg-mips-options "-mips32r2 -mabi=32 -O2" } */
4 /* { dg-add-options mips16_attribute } */
5
6 MIPS16 void
7 foo (int *a, int b, int c)
8 {
9   asm volatile ("" ::: "$2", "$3", "$4", "$5", "$6", "$7", "$8",
10                 "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$16",
11                 "$17", "$18", "$19", "$20", "$21", "$22", "$23", "$24",
12                 "$25", "$30", "memory");
13   a[b] = 1;
14   a[c] = 1;
15 }
16 /* { dg-final { scan-assembler "\tsave\t\\\$4-\\\$6," } } */
17 /* { dg-final { scan-assembler "\trestore\t" } } */