(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
safe-indirect-jump-1.c
       1  /* { dg-do compile } */
       2  /* { dg-skip-if "not implemented for Darwin" { powerpc*-*-darwin* } } */
       3  /* { dg-additional-options "-mno-speculate-indirect-jumps" } */
       4  /* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target *-*-* } 0 } */
       5  
       6  /* Test for deliberate misprediction of indirect calls.  */
       7  
       8  extern int (*f)();
       9  
      10  int bar ()
      11  {
      12    return (*f) ();
      13  }
      14  
      15  /* { dg-final { scan-assembler "crset 2" } } */
      16  
      17  /* The AIX and ELFv2 ABIs don't allow a sibcall here.  */
      18  /* { dg-final { scan-assembler "beqctrl-" { target { lp64 || { powerpc*-*-aix* } } } } } */
      19  
      20  /* The other ABIs do allow a sibcall.  */
      21  /* { dg-final { scan-assembler "beqctr-" { target { ilp32 && !powerpc*-*-aix* } } } } */
      22  /* { dg-final { scan-assembler {b \$} { target { ilp32 && !powerpc*-*-aix* } } } } */