(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
loongarch/
fscaleb.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -mabi=lp64d -mdouble-float -fno-math-errno" } */
       3  /* { dg-final { scan-assembler-times "fscaleb\\.s" 3 } } */
       4  /* { dg-final { scan-assembler-times "fscaleb\\.d" 4 } } */
       5  /* { dg-final { scan-assembler-times "slli\\.w" 1 } } */
       6  
       7  double
       8  my_scalbln (double a, long b)
       9  {
      10    return __builtin_scalbln (a, b);
      11  }
      12  
      13  double
      14  my_scalbn (double a, int b)
      15  {
      16    return __builtin_scalbn (a, b);
      17  }
      18  
      19  double
      20  my_ldexp (double a, int b)
      21  {
      22    return __builtin_ldexp (a, b);
      23  }
      24  
      25  float
      26  my_scalblnf (float a, long b)
      27  {
      28    return __builtin_scalblnf (a, b);
      29  }
      30  
      31  float
      32  my_scalbnf (float a, int b)
      33  {
      34    return __builtin_scalbnf (a, b);
      35  }
      36  
      37  float
      38  my_ldexpf (float a, int b)
      39  {
      40    return __builtin_ldexpf (a, b);
      41  }
      42  
      43  /* b must be sign-extended */
      44  double
      45  my_ldexp_long (double a, long b)
      46  {
      47    return __builtin_ldexp (a, b);
      48  }