(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arm/
pure-code/
no-literal-pool-m23.c
       1  /* { dg-do compile } */
       2  /* { dg-skip-if "skip override" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
       3  /* { dg-options "-mpure-code -mcpu=cortex-m23 -march=armv8-m.base -mthumb -mfloat-abi=soft" } */
       4  /* { dg-final { check-function-bodies "**" "" } } */
       5  
       6  /*
       7  ** testi:
       8  **	...
       9  **	movs	r[0-3], #1
      10  **	lsls	r[0-3], #13
      11  **	rsbs	r[0-3], #0
      12  **	...
      13  */
      14  int
      15  testi (int *p)
      16  {
      17    if (*p > 0x12345678)
      18      return *p-8192;
      19    else
      20      return *p+8192;
      21  }
      22  
      23  /* Does not use thumb1_gen_const_int.
      24  ** test_0:
      25  **	...
      26  **	movs	r[0-3], #0
      27  **	...
      28  */
      29  int
      30  test_0 ()
      31  {
      32    return 0;
      33  }
      34  
      35  /* Does not use thumb1_gen_const_int.
      36  ** test_128:
      37  **	...
      38  **	movs	r[0-3], #128
      39  **	...
      40  */
      41  int
      42  test_128 ()
      43  {
      44    return 128;
      45  }
      46  
      47  /* Does not use thumb1_gen_const_int.
      48  ** test_264:
      49  **	...
      50  **	movw	r[0-3], #264
      51  **	...
      52  */
      53  int
      54  test_264 ()
      55  {
      56    return 264;
      57  }
      58  
      59  /* Does not use thumb1_gen_const_int.
      60  ** test_510:
      61  **	...
      62  **	movw	r[0-3], #510
      63  **	...
      64  */
      65  int
      66  test_510 ()
      67  {
      68    return 510;
      69  }
      70  
      71  /* Does not use thumb1_gen_const_int.
      72  ** test_512:
      73  **	...
      74  **	movw	r[0-3], #512
      75  **	...
      76  */
      77  int
      78  test_512 ()
      79  {
      80    return 512;
      81  }
      82  
      83  /* Does not use thumb1_gen_const_int.
      84  ** test_764:
      85  **	...
      86  **	movw	r[0-3], #764
      87  **	...
      88  */
      89  int
      90  test_764 ()
      91  {
      92    return 764;
      93  }
      94  
      95  /* Does not use thumb1_gen_const_int.
      96  ** test_65536:
      97  **	...
      98  **	movs	r[0-3], #128
      99  **	lsls	r[0-3], r[0-3], #9
     100  **	...
     101  */
     102  int
     103  test_65536 ()
     104  {
     105    return 65536;
     106  }
     107  
     108  /* Does not use thumb1_gen_const_int.
     109  ** test_0x123456:
     110  **	...
     111  **	movw	r[0-3], #13398
     112  **	movt	r[0-3], 18
     113  **	...
     114  */
     115  int
     116  test_0x123456 ()
     117  {
     118    return 0x123456;
     119  }
     120  
     121  /* Does not use thumb1_gen_const_int.
     122  ** test_0x1123456:
     123  **	...
     124  **	movw	r[0-3], #13398
     125  **	movt	r[0-3], 274
     126  **	...
     127  */
     128  int
     129  test_0x1123456 ()
     130  {
     131    return 0x1123456;
     132  }
     133  
     134  /* Does not use thumb1_gen_const_int.
     135  ** test_0x1000010:
     136  **	...
     137  **	movs	r[0-3], #16
     138  **	movt	r[0-3], 256
     139  **	...
     140  */
     141  int
     142  test_0x1000010 ()
     143  {
     144    return 0x1000010;
     145  }
     146  
     147  /* Does not use thumb1_gen_const_int.
     148  ** test_0x1000011:
     149  **	...
     150  **	movs	r[0-3], #17
     151  **	movt	r[0-3], 256
     152  **	...
     153  */
     154  int
     155  test_0x1000011 ()
     156  {
     157    return 0x1000011;
     158  }
     159  
     160  /*
     161  ** test_m8192:
     162  **	...
     163  **	movs	r[0-3], #1
     164  **	lsls	r[0-3], #13
     165  **	rsbs	r[0-3], #0
     166  **	...
     167  */
     168  int
     169  test_m8192 ()
     170  {
     171    return -8192;
     172  }