OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [mips/] [save-restore-1.c] - Blame information for rev 321

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 321 jeremybenn
/* Check that we can use the save instruction to save varargs.  */
2
/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
3
 
4
#include <stdarg.h>
5
 
6
int bar (int, va_list ap);
7
 
8
MIPS16 int
9
foo (int n, ...)
10
{
11
  va_list ap;
12
  int i;
13
 
14
  va_start (ap, n);
15
  i = bar (n, ap);
16
  va_end (ap);
17
  return i + 1;
18
}
19
/* { dg-final { scan-assembler "\tsave\t\\\$4-\\\$7" } } */
20
/* { dg-final { scan-assembler "\trestore\t" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.