Merged with mainline at revision 126229.
[official-gcc.git] / gcc / testsuite / gcc.target / mips / save-restore-4.c
blob10bf141c47f148dd866886223e8267af5fafcc9d
1 /* Check that we can use the save instruction to save $16, $17 and $31. */
2 /* { dg-mips-options "-mips32r2 -mgp32 -mips16 -O2" } */
3 void bar (void);
4 void
5 foo (void)
7 bar ();
8 asm volatile ("" ::: "$16", "$17");
10 /* { dg-final { scan-assembler "\tsave\t\[0-9\]*,\\\$16,\\\$17,\\\$31" } } */
11 /* { dg-final { scan-assembler "\trestore\t\[0-9\]*,\\\$16,\\\$17,\\\$31" } } */