2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / save-restore-1.c
blobf6a854ee9f3b18f5742c77af76a7f1e6ce8b1166
1 /* Check that we can use the save instruction to save varargs. */
2 /* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
4 #include <stdarg.h>
6 int bar (int, va_list ap);
8 MIPS16 int
9 foo (int n, ...)
11 va_list ap;
12 int i;
14 va_start (ap, n);
15 i = bar (n, ap);
16 va_end (ap);
17 return i + 1;
19 /* { dg-final { scan-assembler "\tsave\t\\\$4-\\\$7" } } */
20 /* { dg-final { scan-assembler "\trestore\t" } } */