2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / lazy-binding-1.c
blobe85727c42d7bdceb60c884376bfc7e6e8976d31f
1 /* { dg-do compile } */
2 /* { dg-options "-mabicalls -mshared -mexplicit-relocs -O2 -fno-delayed-branch" } */
4 void bar (void);
6 NOMIPS16 void
7 foo (int n)
9 while (n--)
11 bar ();
12 bar ();
16 /* There should be exactly five uses of $25: one to set up $gp, two to
17 load the address of bar (), and two to call it. */
18 /* { dg-final { scan-assembler-times "\tl.\t\\\$25,%call16\\\(bar\\\)" 2 } } */
19 /* { dg-final { scan-assembler-times "\tjalr\t\\\$25" 2 } } */
20 /* { dg-final { scan-assembler "(\\\$28,|\t.cpload\t)\\\$25" } } */
21 /* { dg-final { scan-assembler-times "\\\$25" 5 } } */