summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/stack-1.c
blob: a28e4bf20755f8e509c3c40972a552d186920db8 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* { dg-final { scan-assembler "\td?addiu\t(\\\$sp,)?\\\$sp,\[1-9\]" } } */
/* { dg-final { scan-assembler "\tlw\t" } } */
/* { dg-final { scan-assembler-not "\td?addiu\t(\\\$sp,)?\\\$sp,\[1-9\].*\tlw\t" } } */

/* Avoid use of SAVE and RESTORE.  */
NOMIPS16 int foo (int y)
{
  volatile int a = y;
  volatile int *volatile b = &a;
  return *b;
}