xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/sparc-ret.c (revision 8500990981f885cbe5e6a4958549cacc238b5ae6)
1 /* Copyright (C) 2001  Free Software Foundation.
2 
3    Making sure that Ultrasparc return instructions do not read
4    below the stack.  */
5 
6 /* { dg-do compile { target sparc*-*-* } } */
7 /* { dg-options "-mcpu=ultrasparc -O -m32" } */
8 
9 
10 int bar (int a, int b, int c, int d, int e, int f, int g, int h)
11 {
12   int res;
13 
14   toto (&res);
15   return h;
16 }
17 /* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*ld\[ \t\]*\\\[%sp\\+96\\\]" } } */
18 
19 int bar2 ()
20 {
21   int res;
22 
23   toto (&res);
24   return res;
25 }
26 /* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*nop" } } */
27 
28