1  /* { dg-do compile { target { powerpc*-*-linux* } } } */
       2  /* { dg-require-effective-target hard_dfp } */
       3  /* { dg-options "-O2" } */
       4  /* { dg-final { scan-assembler-times "dxex "  1 } } */
       5  /* { dg-final { scan-assembler-times "dxexq " 1 } } */
       6  /* { dg-final { scan-assembler-times "diex "  1 } } */
       7  /* { dg-final { scan-assembler-times "diexq " 1 } } */
       8  /* { dg-final { scan-assembler-not "bl __builtin" } } */
       9  /* Verify we don't generate any drintn., drintnq., dctfix, dctfixq, dcffix
      10     or dcffixq instructions, as they imply we are getting unwanted casting.  */
      11  /* { dg-final { scan-assembler-not "drintn\[q\]\." } } */
      12  /* { dg-final { scan-assembler-not "dctfix\[q\]" } } */
      13  /* { dg-final { scan-assembler-not "dcffix\[q\]" } } */
      14  
      15  long long
      16  do_xex (_Decimal64 arg)
      17  {
      18    return __builtin_dxex (arg);
      19  }
      20  
      21  long long
      22  do_xexq (_Decimal128 arg)
      23  {
      24    return __builtin_dxexq (arg);
      25  }
      26  
      27  _Decimal64
      28  do_iex (long long exp, _Decimal64 arg)
      29  {
      30    return __builtin_diex (exp, arg);
      31  }
      32  
      33  _Decimal128
      34  do_iexq (long long exp, _Decimal128 arg)
      35  {
      36    return __builtin_diexq (exp, arg);
      37  }