(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arm/
thumb1-far-jump-2.c
       1  /* Check for thumb1 far jump. This is the extreme case that far jump
       2   * will be used with minimum number of instructions. By passing this case
       3   * it means the heuristic of saving lr for far jump meets the most extreme
       4   * requirement.  */
       5  /* { dg-options "-Os" } */
       6  /* { dg-skip-if "" { ! { arm_thumb1 } } } */
       7  
       8  volatile register int r4 asm ("r4");
       9  void f3(int i)
      10  {
      11  #define GO(n) \
      12    extern volatile int g_##n; \
      13    r4=(int)&g_##n;
      14  
      15  #define GO8(n) \
      16    GO(n##_0) \
      17    GO(n##_1) \
      18    GO(n##_2) \
      19    GO(n##_3) \
      20    GO(n##_4) \
      21    GO(n##_5) \
      22    GO(n##_6) \
      23    GO(n##_7)
      24  
      25  #define GO64(n) \
      26    GO8(n##_0) \
      27    GO8(n##_1) \
      28    GO8(n##_2) \
      29    GO8(n##_3) \
      30    GO8(n##_4) \
      31    GO8(n##_5) \
      32    GO8(n##_6) \
      33    GO8(n##_7) \
      34  
      35  #define GO498(n) \
      36    GO64(n##_0) \
      37    GO64(n##_1) \
      38    GO64(n##_2) \
      39    GO64(n##_3) \
      40    GO64(n##_4) \
      41    GO64(n##_5) \
      42    GO64(n##_6) \
      43    GO8(n##_0) \
      44    GO8(n##_1) \
      45    GO8(n##_2) \
      46    GO8(n##_3) \
      47    GO8(n##_4) \
      48    GO8(n##_5) \
      49    GO(n##_0) \
      50    GO(n##_1) \
      51  
      52    if (i) {
      53      GO498(0);
      54    }
      55  }
      56  
      57  /* { dg-final { scan-assembler "push.*lr" } } */