/* { dg-do compile } */
+/* -mlongcall will cause us to place &foo in the CTR register. */
+/* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
/* { dg-options "-O1 -ftree-loop-ivcanon -funroll-loops -fdump-tree-ivcanon-details -fdump-tree-cunroll-details -fdump-tree-optimized" } */
/* On 31-bit S/390 the function address will be stored (once) in the literal pool,
of PIC mode. */
/* { dg-options "-O1 -ftree-loop-ivcanon -funroll-loops -fdump-tree-ivcanon-details -fdump-tree-cunroll-details -fdump-tree-optimized -static" { target *-*-darwin* } } */
+/* On MIPS, disable generating hints (R_MIPS_JALR) for PIC calls. In addition
+ to the load from the GOT this also contains the name of the funtion so for
+ each call the function name would appear twice. */
+/* { dg-options "-O1 -ftree-loop-ivcanon -funroll-loops -fdump-tree-ivcanon-details -fdump-tree-cunroll-details -fdump-tree-optimized -mno-relax-pic-calls" { target mips*-*-* } } */
+
void xxx(void)
{
int x = 45;
/* { dg-final { scan-tree-dump-times "foo" 5 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
-/* Because hppa and ia64 targets include an external declaration for foo as
- well as the calls we need to look for something more specific then just
- foo in order to count only the calls and not the declaration. */
+/* Because hppa, ia64 and Windows targets include an external declaration
+ for foo as well as the calls we need to look for something more specific
+ than just foo in order to count only the calls and not the declaration. */
/* The SH targets always use separate instructions to load the address
and to do the actual call - bsr is only generated by link time
relaxation. */
/* CRIS keeps the address in a register. */
/* m68k sometimes puts the address in a register, depending on CPU and PIC. */
-/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* m68k-*-* } } } */
+/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* } } } */
/* { dg-final { scan-assembler-times "foo,%r" 5 { target hppa*-*-* } } } */
/* { dg-final { scan-assembler-times "= foo" 5 { target ia64*-*-* } } } */
-/* { dg-final { scan-assembler-times "jsr|blink\ttr?,r18" 5 { target sh*-*-* } } } */
+/* { dg-final { scan-assembler-times "call\[ \t\]*_foo" 5 { target i?86-*-mingw* i?86-*-cygwin* } } } */
+/* { dg-final { scan-assembler-times "jsr|bsrf|blink\ttr?,r18" 5 { target sh*-*-* } } } */
/* { dg-final { scan-assembler-times "Jsr \\\$r" 5 { target cris-*-* } } } */
-/* { dg-final { scan-assembler-times "\[jb\]sr" 5 { target m68k-*-* } } } */
-
-
+/* { dg-final { scan-assembler-times "\[jb\]sr" 5 { target fido-*-* m68k-*-* } } } */