summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/save-restore-4.c
blob: 5bc5bcc3d502be18b8d0281035ccc480042257b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Check that we can use the save instruction to save $16, $17 and $31.  */
/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
/* { dg-skip-if "PR target/46610" { mips-sgi-irix6* } } */

void bar (void);

MIPS16 void
foo (void)
{
  bar ();
  asm volatile ("" ::: "$16", "$17");
}
/* { dg-final { scan-assembler "\tsave\t\[0-9\]*,\\\$16,\\\$17,\\\$31" } } */
/* { dg-final { scan-assembler "\trestore\t\[0-9\]*,\\\$16,\\\$17,\\\$31" } } */