1  /* Test generation of DFP instructions for POWER6.  */
       2  /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
       3  /* { dg-require-effective-target dfp } */
       4  /* { dg-options "-std=gnu99 -O1 -mdejagnu-cpu=power6" } */
       5  
       6  /* { dg-final { scan-assembler-times "fneg" 1 } } */
       7  /* { dg-final { scan-assembler-times "fabs" 1 } } */
       8  /* { dg-final { scan-assembler-times "fnabs" 1 } } */
       9  /* { dg-final { scan-assembler-times "fmr" 0 } } */
      10  
      11  _Decimal64
      12  func1 (_Decimal64 a, _Decimal64 b)
      13  {
      14    return -b;
      15  }
      16  
      17  _Decimal64
      18  func2 (_Decimal64 a, _Decimal64 b)
      19  {
      20    return __builtin_fabsd64 (b);
      21  }
      22  
      23  _Decimal64
      24  func3 (_Decimal64 a, _Decimal64 b)
      25  {
      26    return - __builtin_fabsd64 (b);
      27  }