altivec.md (darn_32): Change the condition to TARGET_P9_MISC instead of TARGET_MODULO.
authorKelvin Nilsen <kelvin@gcc.gnu.org>
Thu, 30 Jun 2016 15:59:44 +0000 (15:59 +0000)
committerKelvin Nilsen <kelvin@gcc.gnu.org>
Thu, 30 Jun 2016 15:59:44 +0000 (15:59 +0000)
gcc/ChangeLog:

2016-06-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/altivec.md (darn_32): Change the condition to
TARGET_P9_MISC instead of TARGET_MODULO.
(darn_raw): Replace TARGET_MODULO with TARGET_P9_MISC in the
condition expression.
(darn): Replace TARGET_MODULO with TARGET_P9_MISC in the
condition expression.
* config/rs6000/dfp.md (UNSPEC_DTSTSFI): New unspec constant.
(DFP_TEST): New code iterator.
(dfptstsfi_<code>_mode>): New define_expand.
(*dfp_sgnfcnc_<mode>): New define_insn.
* config/rs6000/rs6000-builtin.def (BU_P9_MISC_0): Move this macro
definition next to BU_P9_MISC_1 definition and change the MASK
value to RS6000_BTM_P9_MISC.
(BU_P9_MISC_1): Change the MASK value to RS6000_BTM_P9_MISC.
(BU_P9_64BIT_MISC_0): Likewise.
(BU_P9_DFP_MISC_0): New macro definition.
(BU_P9_DFP_MISC_1): New macro definition.
(BU_P9_DFP_MISC_2): New macro definition.
(BU_P9_DFP_OVERLOAD_1): New macro definition.
(BU_P9_DFP_OVERLOAD_2): New macro definition.
(BU_P9_DFP_OVERLOAD_3): New macro definition.
(TSTSFI_LT_DD): New BU_P9_DFP_MISC_2.
(TSTSFI_LT_TD): Likewise.
(TSTSFI_EQ_DD): Likewise.
(TSTSFI_EQ_TD): Likewise.
(TSTSFI_GT_DD): Likewise.
(TSTSFI_GT_TD): Likewise.
(TSTSFI_OV_DD): Likewise.
(TSTSFI_OV_TD): Likewise.
(TSTSFI_LT): New BU_P9_DFP_OVERLOAD_2.
(TSTSFI_LT_DD): Likewise.
(TSTSFI_LT_TD): Likewise.
(TSTSFI_EQ): Likewise.
(TSTSFI_EQ_DD): Likewise.
(TSTSFI_EQ_TD): Likewise.
(TSTSFI_GT): Likewise.
(TSTSFI_GT_DD): Likewise.
(TSTSFI_GT_TD): Likewise.
(TSTSFI_OV): Likewise.
(TSTSFI_OV_DD): Likewise.
(TSTSFI_OV_TD): Likewise.
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
overloaded test significance functions.
* config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Add
OPTION_MASK_P9_MISC into the representation of this mask.
(POWERPC_MASKS): Add OPTION_MASK_P9_MISC into the representation
of this mask.
* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Set the
RS6000_BTM_P9_MISC flag in the return value if TARGET_P9_MISC is
non-zero.
(rs6000_expand_binop_builtin): Enforce that argument 0 of the exp
argument is a 6-bit unsigned literal value if the icode argument
represents a DFP test significance built-in call.
(rs6000_invalid_builtin): Add support for the RS6000_BTM_P9_MISC
flag used independently and in combination with the
RS6000_BTM_64BIT flag.
(rs6000_opt_masks): Add entry for power9-misc command-line option.
(rs6000_builtin_mask_names): Add entry for power9-misc
command-line option.
* config/rs6000/rs6000.h: Redefine TARGET_P9_MISC as 0 if
HAVE_AS_POWER9 is not a defined macro.  Define MASK_P9_MISC and
RS6000_BTM_P9_MISC macros.
* config/rs6000/rs6000.opt: Add support for the -mpower9-misc
option and change the description of the -mpower9-vector option to
enable only vector instructions, removing its erroneously claimed
support for scalar instructions.
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Document
the ISA 3.0 digital floating point test significance built-in
functions.

gcc/testsuite/ChangeLog:

2016-06-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/dfp/dfp.exp: New dejagnu test script.
* gcc.target/powerpc/dfp/dtstsfi-0.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-1.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-10.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-11.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-12.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-13.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-14.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-15.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-16.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-17.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-18.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-19.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-2.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-20.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-21.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-22.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-23.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-24.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-25.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-26.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-27.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-28.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-29.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-3.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-30.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-31.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-32.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-33.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-34.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-35.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-36.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-37.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-38.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-39.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-4.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-40.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-41.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-42.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-43.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-44.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-45.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-46.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-47.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-48.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-49.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-5.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-50.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-51.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-52.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-53.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-54.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-55.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-56.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-57.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-58.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-59.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-6.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-60.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-61.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-62.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-63.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-64.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-65.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-66.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-67.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-68.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-69.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-7.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-70.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-71.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-72.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-73.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-74.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-75.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-76.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-77.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-78.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-79.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-8.c: New test.
* gcc.target/powerpc/dfp/dtstsfi-9.c: New test.

From-SVN: r237885

92 files changed:
gcc/ChangeLog
gcc/config/rs6000/altivec.md
gcc/config/rs6000/dfp.md
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/rs6000-c.c
gcc/config/rs6000/rs6000-cpus.def
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/rs6000.opt
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-10.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-11.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-12.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-14.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-15.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-17.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-18.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-19.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-20.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-21.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-22.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-23.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-24.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-25.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-26.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-27.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-28.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-29.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-30.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-31.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-33.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-34.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-35.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-36.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-37.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-38.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-39.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-40.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-41.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-42.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-43.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-44.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-45.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-46.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-47.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-48.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-49.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-50.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-51.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-52.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-53.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-54.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-55.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-56.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-57.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-59.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-60.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-61.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-62.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-63.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-65.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-66.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-67.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-68.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-69.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-70.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-71.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-72.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-73.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-74.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-75.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-76.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-77.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-78.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-79.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-9.c [new file with mode: 0644]

index 88cab9847da939446a5fe883b4db2c6f463c115f..2b27fabe42242f03d5c1323bdbe071a3c80b85ea 100644 (file)
@@ -1,3 +1,75 @@
+2016-06-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
+
+       * config/rs6000/altivec.md (darn_32): Change the condition to
+       TARGET_P9_MISC instead of TARGET_MODULO.
+       (darn_raw): Replace TARGET_MODULO with TARGET_P9_MISC in the
+       condition expression.
+       (darn): Replace TARGET_MODULO with TARGET_P9_MISC in the
+       condition expression.
+       * config/rs6000/dfp.md (UNSPEC_DTSTSFI): New unspec constant.
+       (DFP_TEST): New code iterator.
+       (dfptstsfi_<code>_mode>): New define_expand.
+       (*dfp_sgnfcnc_<mode>): New define_insn.
+       * config/rs6000/rs6000-builtin.def (BU_P9_MISC_0): Move this macro
+       definition next to BU_P9_MISC_1 definition and change the MASK
+       value to RS6000_BTM_P9_MISC.
+       (BU_P9_MISC_1): Change the MASK value to RS6000_BTM_P9_MISC.
+       (BU_P9_64BIT_MISC_0): Likewise.
+       (BU_P9_DFP_MISC_0): New macro definition.
+       (BU_P9_DFP_MISC_1): New macro definition.
+       (BU_P9_DFP_MISC_2): New macro definition.
+       (BU_P9_DFP_OVERLOAD_1): New macro definition.
+       (BU_P9_DFP_OVERLOAD_2): New macro definition.
+       (BU_P9_DFP_OVERLOAD_3): New macro definition.
+       (TSTSFI_LT_DD): New BU_P9_DFP_MISC_2.
+       (TSTSFI_LT_TD): Likewise.
+       (TSTSFI_EQ_DD): Likewise.
+       (TSTSFI_EQ_TD): Likewise.
+       (TSTSFI_GT_DD): Likewise.
+       (TSTSFI_GT_TD): Likewise.
+       (TSTSFI_OV_DD): Likewise.
+       (TSTSFI_OV_TD): Likewise.
+       (TSTSFI_LT): New BU_P9_DFP_OVERLOAD_2.
+       (TSTSFI_LT_DD): Likewise.
+       (TSTSFI_LT_TD): Likewise.
+       (TSTSFI_EQ): Likewise.
+       (TSTSFI_EQ_DD): Likewise.
+       (TSTSFI_EQ_TD): Likewise.
+       (TSTSFI_GT): Likewise.
+       (TSTSFI_GT_DD): Likewise.
+       (TSTSFI_GT_TD): Likewise.
+       (TSTSFI_OV): Likewise.
+       (TSTSFI_OV_DD): Likewise.
+       (TSTSFI_OV_TD): Likewise.
+       * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
+       overloaded test significance functions.
+       * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Add
+       OPTION_MASK_P9_MISC into the representation of this mask.
+       (POWERPC_MASKS): Add OPTION_MASK_P9_MISC into the representation
+       of this mask.
+       * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Set the
+       RS6000_BTM_P9_MISC flag in the return value if TARGET_P9_MISC is
+       non-zero.
+       (rs6000_expand_binop_builtin): Enforce that argument 0 of the exp
+       argument is a 6-bit unsigned literal value if the icode argument
+       represents a DFP test significance built-in call.
+       (rs6000_invalid_builtin): Add support for the RS6000_BTM_P9_MISC
+       flag used independently and in combination with the
+       RS6000_BTM_64BIT flag.
+       (rs6000_opt_masks): Add entry for power9-misc command-line option.
+       (rs6000_builtin_mask_names): Add entry for power9-misc
+       command-line option.
+       * config/rs6000/rs6000.h: Redefine TARGET_P9_MISC as 0 if
+       HAVE_AS_POWER9 is not a defined macro.  Define MASK_P9_MISC and
+       RS6000_BTM_P9_MISC macros.
+       * config/rs6000/rs6000.opt: Add support for the -mpower9-misc
+       option and change the description of the -mpower9-vector option to
+       enable only vector instructions, removing its erroneously claimed
+       support for scalar instructions.
+       * doc/extend.texi (PowerPC AltiVec Built-in Functions): Document
+       the ISA 3.0 digital floating point test significance built-in
+       functions.
+
 2016-06-30  Wilco Dijkstra  <wdijkstr@arm.com>
 
        * config/aarch64/aarch64.c (cortexa35_tunings):
index fcc00b515bb5bef1bfdc2305634876bbf9e9b32e..b45b86f4e7b21ac8efbb154f5efdb3a9ac2a20e1 100644 (file)
 (define_insn "darn_32"
   [(set (match_operand:SI 0 "register_operand" "=r")
         (unspec:SI [(const_int 0)] UNSPEC_DARN_32))]
-  "TARGET_MODULO"
+  "TARGET_P9_MISC"
   "darn %0,0"
   [(set_attr "type" "integer")])
 
 (define_insn "darn_raw"
   [(set (match_operand:DI 0 "register_operand" "=r")
         (unspec:DI [(const_int 0)] UNSPEC_DARN_RAW))]
-  "TARGET_MODULO && TARGET_64BIT"
+  "TARGET_P9_MISC && TARGET_64BIT"
   "darn %0,2"
   [(set_attr "type" "integer")])
 
 (define_insn "darn"
   [(set (match_operand:DI 0 "register_operand" "=r")
         (unspec:DI [(const_int 0)] UNSPEC_DARN))]
-  "TARGET_MODULO && TARGET_64BIT"
+  "TARGET_P9_MISC && TARGET_64BIT"
   "darn %0,1"
   [(set_attr "type" "integer")])
 
index e3a29878cea24cf44ef75931bdb36dae53169a7e..e52a011e00899eda62186d156aaae09b1257fb39 100644 (file)
    UNSPEC_DXEX
    UNSPEC_DIEX
    UNSPEC_DSCLI
+   UNSPEC_DTSTSFI
    UNSPEC_DSCRI])
 
+(define_code_iterator DFP_TEST [eq lt gt unordered])
+
 (define_mode_iterator D64_D128 [DD TD])
 
 (define_mode_attr dfp_suffix [(DD "")
   "diex<dfp_suffix> %0,%1,%2"
   [(set_attr "type" "dfp")])
 
+(define_expand "dfptstsfi_<code>_<mode>"
+  [(set (match_dup 3)
+       (compare:CCFP
+         (unspec:D64_D128
+         [(match_operand:SI 1 "const_int_operand" "n")
+          (match_operand:D64_D128 2 "gpc_reg_operand" "d")]
+         UNSPEC_DTSTSFI)
+        (match_dup 4)))
+   (set (match_operand:SI 0 "register_operand" "")
+       (DFP_TEST:SI (match_dup 3)
+                    (const_int 0)))
+  ]
+  "TARGET_P9_MISC"
+{
+  operands[3] = gen_reg_rtx (CCFPmode);
+  operands[4] = const0_rtx;
+})
+
+(define_insn "*dfp_sgnfcnc_<mode>"
+  [(set (match_operand:CCFP 0 "" "=y")
+        (compare:CCFP
+        (unspec:D64_D128 [(match_operand:SI 1 "const_int_operand" "n")
+                          (match_operand:D64_D128 2 "gpc_reg_operand" "d")]
+          UNSPEC_DTSTSFI)
+        (match_operand:SI 3 "zero_constant" "j")))]
+  "TARGET_P9_MISC"
+{
+  /* If immediate operand is greater than 63, it will behave as if
+     the value had been 63.  The code generator does not support
+     immediate operand values greater than 63.  */
+  if (!(IN_RANGE (INTVAL (operands[1]), 0, 63)))
+    operands[1] = GEN_INT (63);
+  return "dtstsfi<dfp_suffix> %0,%1,%2";
+}
+  [(set_attr "type" "fp")])
+
 (define_insn "dfp_dscli_<mode>"
   [(set (match_operand:D64_D128 0 "gpc_reg_operand" "=d")
        (unspec:D64_D128 [(match_operand:D64_D128 1 "gpc_reg_operand" "d")
index 533f77120d3da9a1130c50b627bc91c6c772839b..fef3fd4b49661ef522222c2847c4d59c0cbcfa29 100644 (file)
 /* Miscellaneous builtins for instructions added in ISA 3.0.  These
    instructions don't require either the DFP or VSX options, just the basic
    ISA 3.0 enablement since they operate on general purpose registers.  */
+#define BU_P9_MISC_0(ENUM, NAME, ATTR, ICODE)                      \
+  RS6000_BUILTIN_0 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
+                   "__builtin_" NAME,                  /* NAME */      \
+                   RS6000_BTM_P9_MISC,                 /* MASK */      \
+                   (RS6000_BTC_ ## ATTR                /* ATTR */      \
+                    | RS6000_BTC_SPECIAL),                             \
+                   CODE_FOR_ ## ICODE)                 /* ICODE */
+
 #define BU_P9_MISC_1(ENUM, NAME, ATTR, ICODE)                          \
   RS6000_BUILTIN_1 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
                    "__builtin_" NAME,                  /* NAME */      \
-                   RS6000_BTM_MODULO,                  /* MASK */      \
+                   RS6000_BTM_P9_MISC,                 /* MASK */      \
                    (RS6000_BTC_ ## ATTR                /* ATTR */      \
                     | RS6000_BTC_UNARY),                               \
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 #define BU_P9_64BIT_MISC_0(ENUM, NAME, ATTR, ICODE)                    \
   RS6000_BUILTIN_0 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
                    "__builtin_" NAME,                  /* NAME */      \
-                   RS6000_BTM_MODULO                                   \
+                   RS6000_BTM_P9_MISC                                  \
                      | RS6000_BTM_64BIT,               /* MASK */      \
                    (RS6000_BTC_ ## ATTR                /* ATTR */      \
                     | RS6000_BTC_SPECIAL),                             \
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
-/* Miscellaneous builtins for instructions added in ISA 3.0.  These
-   instructions don't require either the DFP or VSX options, just the basic
-   ISA 3.0 enablement since they operate on general purpose registers.  */
-#define BU_P9_MISC_0(ENUM, NAME, ATTR, ICODE)                      \
+/* Miscellaneous builtins for decimal floating point instructions
+   added in ISA 3.0.  These instructions don't require the VSX
+   options, just the basic ISA 3.0 enablement since they operate on
+   general purpose registers.  */
+#define BU_P9_DFP_MISC_0(ENUM, NAME, ATTR, ICODE)                      \
   RS6000_BUILTIN_0 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
                    "__builtin_" NAME,                  /* NAME */      \
-                   RS6000_BTM_MODULO,                  /* MASK */      \
+                   RS6000_BTM_P9_MISC,                 /* MASK */      \
                    (RS6000_BTC_ ## ATTR                /* ATTR */      \
                     | RS6000_BTC_SPECIAL),                             \
                    CODE_FOR_ ## ICODE)                 /* ICODE */
 
+#define BU_P9_DFP_MISC_1(ENUM, NAME, ATTR, ICODE)                      \
+  RS6000_BUILTIN_1 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
+                   "__builtin_" NAME,                  /* NAME */      \
+                   RS6000_BTM_P9_MISC,                 /* MASK */      \
+                   (RS6000_BTC_ ## ATTR                /* ATTR */      \
+                    | RS6000_BTC_SPECIAL),                             \
+                   CODE_FOR_ ## ICODE)                 /* ICODE */
+
+#define BU_P9_DFP_MISC_2(ENUM, NAME, ATTR, ICODE)                      \
+  RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM,             /* ENUM */      \
+                   "__builtin_" NAME,                  /* NAME */      \
+                   RS6000_BTM_P9_MISC,                 /* MASK */      \
+                   (RS6000_BTC_ ## ATTR                /* ATTR */      \
+                    | RS6000_BTC_SPECIAL),                             \
+                   CODE_FOR_ ## ICODE)                 /* ICODE */
+
+/* Decimal floating point overloaded functions added in ISA 3.0 */
+#define BU_P9_DFP_OVERLOAD_1(ENUM, NAME)                               \
+  RS6000_BUILTIN_1 (P9_BUILTIN_DFP_ ## ENUM,           /* ENUM */      \
+                   "__builtin_dfp_" NAME,              /* NAME */      \
+                   RS6000_BTM_P9_MISC,                 /* MASK */      \
+                   (RS6000_BTC_OVERLOADED              /* ATTR */      \
+                    | RS6000_BTC_UNARY),                               \
+                   CODE_FOR_nothing)                   /* ICODE */
+
+#define BU_P9_DFP_OVERLOAD_2(ENUM, NAME)                               \
+  RS6000_BUILTIN_2 (P9_BUILTIN_DFP_ ## ENUM,           /* ENUM */      \
+                   "__builtin_dfp_" NAME,              /* NAME */      \
+                   RS6000_BTM_P9_MISC,                 /* MASK */      \
+                   (RS6000_BTC_OVERLOADED              /* ATTR */      \
+                    | RS6000_BTC_BINARY),                              \
+                   CODE_FOR_nothing)                   /* ICODE */
+
+#define BU_P9_DFP_OVERLOAD_3(ENUM, NAME)                               \
+  RS6000_BUILTIN_3 (P9_BUILTIN_DFP_ ## ENUM,           /* ENUM */      \
+                   "__builtin_dfp_" NAME,              /* NAME */      \
+                   RS6000_BTM_P9_MISC,                 /* MASK */      \
+                   (RS6000_BTC_OVERLOADED              /* ATTR */      \
+                    | RS6000_BTC_TERNARY),                             \
+                   CODE_FOR_nothing)                   /* ICODE */
+
 /* ISA 3.0 (power9) vector convenience macros.  */
 /* For the instructions that are encoded as altivec instructions use
    __builtin_altivec_ as the builtin name.  */
@@ -1810,6 +1860,36 @@ BU_LDBL128_2 (UNPACK_TF, "unpack_longdouble",    CONST,  unpacktf)
 BU_P7_MISC_2 (PACK_V1TI,       "pack_vector_int128",   CONST,  packv1ti)
 BU_P7_MISC_2 (UNPACK_V1TI,     "unpack_vector_int128", CONST,  unpackv1ti)
 
+/* 2 argument DFP (Decimal Floating Point) functions added in ISA 3.0.  */
+BU_P9_DFP_MISC_2 (TSTSFI_LT_DD, "dtstsfi_lt_dd", CONST, dfptstsfi_lt_dd)
+BU_P9_DFP_MISC_2 (TSTSFI_LT_TD, "dtstsfi_lt_td", CONST, dfptstsfi_lt_td)
+
+BU_P9_DFP_MISC_2 (TSTSFI_EQ_DD, "dtstsfi_eq_dd", CONST, dfptstsfi_eq_dd)
+BU_P9_DFP_MISC_2 (TSTSFI_EQ_TD, "dtstsfi_eq_td", CONST, dfptstsfi_eq_td)
+
+BU_P9_DFP_MISC_2 (TSTSFI_GT_DD, "dtstsfi_gt_dd", CONST, dfptstsfi_gt_dd)
+BU_P9_DFP_MISC_2 (TSTSFI_GT_TD, "dtstsfi_gt_td", CONST, dfptstsfi_gt_td)
+
+BU_P9_DFP_MISC_2 (TSTSFI_OV_DD, "dtstsfi_ov_dd", CONST, dfptstsfi_unordered_dd)
+BU_P9_DFP_MISC_2 (TSTSFI_OV_TD, "dtstsfi_ov_td", CONST, dfptstsfi_unordered_td)
+
+/* 2 argument overloaded DFP functions added in ISA 3.0.  */
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_LT,       "dtstsfi_lt")
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_LT_DD,    "dtstsfi_lt_dd")
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_LT_TD,    "dtstsfi_lt_td")
+
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_EQ,       "dtstsfi_eq")
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_EQ_DD,    "dtstsfi_eq_dd")
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_EQ_TD,    "dtstsfi_eq_td")
+
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_GT,       "dtstsfi_gt")
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_GT_DD,    "dtstsfi_gt_dd")
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_GT_TD,    "dtstsfi_gt_td")
+
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_OV,       "dtstsfi_ov")
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_OV_DD,    "dtstsfi_ov_dd")
+BU_P9_DFP_OVERLOAD_2 (TSTSFI_OV_TD,    "dtstsfi_ov_td")
+
 /* 1 argument vector functions added in ISA 3.0 (power9).  */
 BU_P9V_AV_1 (VCTZB,            "vctzb",                CONST,  ctzv16qi2)
 BU_P9V_AV_1 (VCTZH,            "vctzh",                CONST,  ctzv8hi2)
index 79a7e88a5ee0e15bc74f3008219b3b4793e428c4..4500668ed9f5868302a545fbb3fc884ebcdce5d2 100644 (file)
@@ -4203,6 +4203,46 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
   { P8V_BUILTIN_VEC_VCLZD, P8V_BUILTIN_VCLZD,
     RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0, 0 },
 
+  { P9_BUILTIN_DFP_TSTSFI_LT, MISC_BUILTIN_TSTSFI_LT_TD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat128, 0 },
+  { P9_BUILTIN_DFP_TSTSFI_LT, MISC_BUILTIN_TSTSFI_LT_DD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat64, 0 },
+
+  { P9_BUILTIN_DFP_TSTSFI_LT_TD, MISC_BUILTIN_TSTSFI_LT_TD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat128, 0 },
+  { P9_BUILTIN_DFP_TSTSFI_LT_DD, MISC_BUILTIN_TSTSFI_LT_DD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat64, 0 },
+
+  { P9_BUILTIN_DFP_TSTSFI_EQ, MISC_BUILTIN_TSTSFI_EQ_TD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat128, 0 },
+  { P9_BUILTIN_DFP_TSTSFI_EQ, MISC_BUILTIN_TSTSFI_EQ_DD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat64, 0 },
+
+  { P9_BUILTIN_DFP_TSTSFI_EQ_TD, MISC_BUILTIN_TSTSFI_EQ_TD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat128, 0 },
+  { P9_BUILTIN_DFP_TSTSFI_EQ_DD, MISC_BUILTIN_TSTSFI_EQ_DD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat64, 0 },
+
+  { P9_BUILTIN_DFP_TSTSFI_GT, MISC_BUILTIN_TSTSFI_GT_TD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat128, 0 },
+  { P9_BUILTIN_DFP_TSTSFI_GT, MISC_BUILTIN_TSTSFI_GT_DD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat64, 0 },
+
+  { P9_BUILTIN_DFP_TSTSFI_GT_TD, MISC_BUILTIN_TSTSFI_GT_TD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat128, 0 },
+  { P9_BUILTIN_DFP_TSTSFI_GT_DD, MISC_BUILTIN_TSTSFI_GT_DD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat64, 0 },
+
+  { P9_BUILTIN_DFP_TSTSFI_OV, MISC_BUILTIN_TSTSFI_OV_TD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat128, 0 },
+  { P9_BUILTIN_DFP_TSTSFI_OV, MISC_BUILTIN_TSTSFI_OV_DD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat64, 0 },
+
+  { P9_BUILTIN_DFP_TSTSFI_OV_TD, MISC_BUILTIN_TSTSFI_OV_TD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat128, 0 },
+  { P9_BUILTIN_DFP_TSTSFI_OV_DD, MISC_BUILTIN_TSTSFI_OV_DD,
+    RS6000_BTI_INTSI, RS6000_BTI_UINTSI, RS6000_BTI_dfloat64, 0 },
+
   { P9V_BUILTIN_VEC_VCTZ, P9V_BUILTIN_VCTZB,
     RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0, 0 },
   { P9V_BUILTIN_VEC_VCTZ, P9V_BUILTIN_VCTZB,
index 8fbf1b94268e7793b6e929da7a0ccb57a1073756..7c67b6f2c8e279ba70aceaf247786a2ffe7d3da9 100644 (file)
@@ -69,6 +69,7 @@
                                 | OPTION_MASK_P9_FUSION                \
                                 | OPTION_MASK_P9_DFORM_SCALAR          \
                                 | OPTION_MASK_P9_DFORM_VECTOR          \
+                                | OPTION_MASK_P9_MISC                  \
                                 | OPTION_MASK_P9_VECTOR)
 
 #define POWERPC_7400_MASK      (OPTION_MASK_PPC_GFXOPT | OPTION_MASK_ALTIVEC)
                                 | OPTION_MASK_P9_DFORM_VECTOR          \
                                 | OPTION_MASK_P9_FUSION                \
                                 | OPTION_MASK_P9_MINMAX                \
+                                | OPTION_MASK_P9_MISC                  \
                                 | OPTION_MASK_P9_VECTOR                \
                                 | OPTION_MASK_POPCNTB                  \
                                 | OPTION_MASK_POPCNTD                  \
index b6e4df05077e3816d2d864d431cb2e2bdffb7618..a34f28755dde7b4a5552d25b1ceafa54b4a05d8a 100644 (file)
@@ -3680,6 +3680,7 @@ rs6000_builtin_mask_calculate (void)
          | ((rs6000_cpu == PROCESSOR_CELL) ? RS6000_BTM_CELL      : 0)
          | ((TARGET_P8_VECTOR)             ? RS6000_BTM_P8_VECTOR : 0)
          | ((TARGET_P9_VECTOR)             ? RS6000_BTM_P9_VECTOR : 0)
+         | ((TARGET_P9_MISC)               ? RS6000_BTM_P9_MISC   : 0)
          | ((TARGET_MODULO)                ? RS6000_BTM_MODULO    : 0)
          | ((TARGET_64BIT)                 ? RS6000_BTM_64BIT     : 0)
          | ((TARGET_CRYPTO)                ? RS6000_BTM_CRYPTO    : 0)
@@ -13380,6 +13381,24 @@ rs6000_expand_binop_builtin (enum insn_code icode, tree exp, rtx target)
          return const0_rtx;
        }
     }
+  else if (icode == CODE_FOR_dfptstsfi_eq_dd
+      || icode == CODE_FOR_dfptstsfi_lt_dd
+      || icode == CODE_FOR_dfptstsfi_gt_dd
+      || icode == CODE_FOR_dfptstsfi_unordered_dd
+      || icode == CODE_FOR_dfptstsfi_eq_td
+      || icode == CODE_FOR_dfptstsfi_lt_td
+      || icode == CODE_FOR_dfptstsfi_gt_td
+      || icode == CODE_FOR_dfptstsfi_unordered_td)
+    {
+      /* Only allow 6-bit unsigned literals.  */
+      STRIP_NOPS (arg0);
+      if (TREE_CODE (arg0) != INTEGER_CST
+         || !IN_RANGE (TREE_INT_CST_LOW (arg0), 0, 63))
+       {
+         error ("argument 1 must be a 6-bit unsigned literal");
+         return CONST0_RTX (tmode);
+       }
+    }
 
   if (target == 0
       || GET_MODE (target) != tmode
@@ -15486,6 +15505,12 @@ rs6000_invalid_builtin (enum rs6000_builtins fncode)
     error ("Builtin function %s requires the -mpower8-vector option", name);
   else if ((fnmask & RS6000_BTM_P9_VECTOR) != 0)
     error ("Builtin function %s requires the -mpower9-vector option", name);
+  else if ((fnmask & (RS6000_BTM_P9_MISC | RS6000_BTM_64BIT))
+          == (RS6000_BTM_P9_MISC | RS6000_BTM_64BIT))
+    error ("Builtin function %s requires the -mpower9-misc and"
+          " -m64 options", name);
+  else if ((fnmask & RS6000_BTM_P9_MISC) == RS6000_BTM_P9_MISC)
+    error ("Builtin function %s requires the -mpower9-misc option", name);
   else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
           == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
     error ("Builtin function %s requires the -mhard-float and"
@@ -35825,6 +35850,7 @@ static struct rs6000_opt_mask const rs6000_opt_masks[] =
   { "power9-dform-vector",     OPTION_MASK_P9_DFORM_VECTOR,    false, true  },
   { "power9-fusion",           OPTION_MASK_P9_FUSION,          false, true  },
   { "power9-minmax",           OPTION_MASK_P9_MINMAX,          false, true  },
+  { "power9-misc",             OPTION_MASK_P9_MISC,            false, true  },
   { "power9-vector",           OPTION_MASK_P9_VECTOR,          false, true  },
   { "powerpc-gfxopt",          OPTION_MASK_PPC_GFXOPT,         false, true  },
   { "powerpc-gpopt",           OPTION_MASK_PPC_GPOPT,          false, true  },
@@ -35881,6 +35907,7 @@ static struct rs6000_opt_mask const rs6000_builtin_mask_names[] =
   { "cell",             RS6000_BTM_CELL,       false, false },
   { "power8-vector",    RS6000_BTM_P8_VECTOR,  false, false },
   { "power9-vector",    RS6000_BTM_P9_VECTOR,  false, false },
+  { "power9-misc",      RS6000_BTM_P9_MISC,    false, false },
   { "crypto",           RS6000_BTM_CRYPTO,     false, false },
   { "htm",              RS6000_BTM_HTM,        false, false },
   { "hard-dfp",                 RS6000_BTM_DFP,        false, false },
index f835f439416f10428183a349f4d36a9a8b0aab8c..a6e80d7c8971508ed47d62c5e762b30c49c033e8 100644 (file)
@@ -314,12 +314,14 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 #undef  TARGET_P9_MINMAX
 #undef  TARGET_P9_DFORM_SCALAR
 #undef  TARGET_P9_DFORM_VECTOR
+#undef  TARGET_P9_MISC
 #define TARGET_FLOAT128_HW 0
 #define TARGET_MODULO 0
 #define TARGET_P9_VECTOR 0
 #define TARGET_P9_MINMAX 0
 #define TARGET_P9_DFORM_SCALAR 0
 #define TARGET_P9_DFORM_VECTOR 0
+#define TARGET_P9_MISC 0
 #endif
 
 /* Define TARGET_LWSYNC_INSTRUCTION if the assembler knows about lwsync.  If
@@ -648,6 +650,7 @@ extern int rs6000_vector_align[];
 #define MASK_NO_UPDATE                 OPTION_MASK_NO_UPDATE
 #define MASK_P8_VECTOR                 OPTION_MASK_P8_VECTOR
 #define MASK_P9_VECTOR                 OPTION_MASK_P9_VECTOR
+#define MASK_P9_MISC                   OPTION_MASK_P9_MISC
 #define MASK_POPCNTB                   OPTION_MASK_POPCNTB
 #define MASK_POPCNTD                   OPTION_MASK_POPCNTD
 #define MASK_PPC_GFXOPT                        OPTION_MASK_PPC_GFXOPT
@@ -2698,6 +2701,7 @@ extern int frame_pointer_needed;
 #define RS6000_BTM_VSX         MASK_VSX        /* VSX (vector/scalar).  */
 #define RS6000_BTM_P8_VECTOR   MASK_P8_VECTOR  /* ISA 2.07 vector.  */
 #define RS6000_BTM_P9_VECTOR   MASK_P9_VECTOR  /* ISA 3.0 vector.  */
+#define RS6000_BTM_P9_MISC     MASK_P9_MISC    /* ISA 3.0 misc. non-vector */
 #define RS6000_BTM_CRYPTO      MASK_CRYPTO     /* crypto funcs.  */
 #define RS6000_BTM_HTM         MASK_HTM        /* hardware TM funcs.  */
 #define RS6000_BTM_SPE         MASK_STRING     /* E500 */
@@ -2718,6 +2722,7 @@ extern int frame_pointer_needed;
                                 | RS6000_BTM_VSX                       \
                                 | RS6000_BTM_P8_VECTOR                 \
                                 | RS6000_BTM_P9_VECTOR                 \
+                                | RS6000_BTM_P9_MISC                   \
                                 | RS6000_BTM_MODULO                    \
                                 | RS6000_BTM_CRYPTO                    \
                                 | RS6000_BTM_FRE                       \
index 4b9905fe7674d71d04f43b7299f6dddee6b8ee54..4f67473c7d6ab613b81f815e6d637815bbfd512c 100644 (file)
@@ -609,9 +609,13 @@ mpower9-fusion
 Target Report Mask(P9_FUSION) Var(rs6000_isa_flags)
 Fuse certain operations together for better performance on power9.
 
+mpower9-misc
+Target Undocumented Report Mask(P9_MISC) Var(rs6000_isa_flags)
+Use/do not use certain scalar instructions added in ISA 3.0.
+
 mpower9-vector
 Target Report Mask(P9_VECTOR) Var(rs6000_isa_flags)
-Use/do not use vector and scalar instructions added in ISA 3.0.
+Use/do not use vector instructions added in ISA 3.0.
 
 mpower9-dform-scalar
 Target Undocumented Mask(P9_DFORM_SCALAR) Var(rs6000_isa_flags)
index b5f6e12f8be4568cb721b6b827647da8f0b580ba..5b9e6174cfa5bcfa3a58055c7610725d9ed3de2d 100644 (file)
@@ -14842,12 +14842,31 @@ The @code{__builtin_divde}, @code{__builtin_divdeo},
 64-bit environment support ISA 2.06 or later.
 
 The following built-in functions are available for the PowerPC family
-of processors, starting with ISA 3.0 or later (@option{-mcpu=power9})
-or with @option{-mmodulo}:
+of processors, starting with ISA 3.0 or later (@option{-mcpu=power9}):
 @smallexample
 long long __builtin_darn (void);
 long long __builtin_darn_raw (void);
 int __builtin_darn_32 (void);
+
+int __builtin_dfp_dtstsfi_lt (unsigned int comparison, _Decimal64 value);
+int __builtin_dfp_dtstsfi_lt (unsigned int comparison, _Decimal128 value);
+int __builtin_dfp_dtstsfi_lt_dd (unsigned int comparison, _Decimal64 value);
+int __builtin_dfp_dtstsfi_lt_td (unsigned int comparison, _Decimal128 value);
+
+int __builtin_dfp_dtstsfi_gt (unsigned int comparison, _Decimal64 value);
+int __builtin_dfp_dtstsfi_gt (unsigned int comparison, _Decimal128 value);
+int __builtin_dfp_dtstsfi_gt_dd (unsigned int comparison, _Decimal64 value);
+int __builtin_dfp_dtstsfi_gt_td (unsigned int comparison, _Decimal128 value);
+
+int __builtin_dfp_dtstsfi_eq (unsigned int comparison, _Decimal64 value);
+int __builtin_dfp_dtstsfi_eq (unsigned int comparison, _Decimal128 value);
+int __builtin_dfp_dtstsfi_eq_dd (unsigned int comparison, _Decimal64 value);
+int __builtin_dfp_dtstsfi_eq_td (unsigned int comparison, _Decimal128 value);
+
+int __builtin_dfp_dtstsfi_ov (unsigned int comparison, _Decimal64 value);
+int __builtin_dfp_dtstsfi_ov (unsigned int comparison, _Decimal128 value);
+int __builtin_dfp_dtstsfi_ov_dd (unsigned int comparison, _Decimal64 value);
+int __builtin_dfp_dtstsfi_ov_td (unsigned int comparison, _Decimal128 value);
 @end smallexample
 
 The @code{__builtin_darn} and @code{__builtin_darn_raw}
@@ -14858,6 +14877,38 @@ random number.  The @code{__builtin_darn_raw} function provides a
 64-bit raw random number.  The @code{__builtin_darn_32} function
 provides a 32-bit random number.
 
+The @code{__builtin_dfp_dtstsfi_lt} function returns a non-zero value
+if and only if the number of signficant digits of its @code{value} argument
+is less than its @code{comparison} argument.  The
+@code{__builtin_dfp_dtstsfi_lt_dd} and
+@code{__builtin_dfp_dtstsfi_lt_td} functions behave similarly, but
+require that the type of the @code{value} argument be
+@code{__Decimal64} and @code{__Decimal128} respectively.
+
+The @code{__builtin_dfp_dtstsfi_gt} function returns a non-zero value
+if and only if the number of signficant digits of its @code{value} argument
+is greater than its @code{comparison} argument.  The
+@code{__builtin_dfp_dtstsfi_gt_dd} and
+@code{__builtin_dfp_dtstsfi_gt_td} functions behave similarly, but
+require that the type of the @code{value} argument be
+@code{__Decimal64} and @code{__Decimal128} respectively.
+
+The @code{__builtin_dfp_dtstsfi_eq} function returns a non-zero value
+if and only if the number of signficant digits of its @code{value} argument
+equals its @code{comparison} argument.  The
+@code{__builtin_dfp_dtstsfi_eq_dd} and
+@code{__builtin_dfp_dtstsfi_eq_td} functions behave similarly, but
+require that the type of the @code{value} argument be
+@code{__Decimal64} and @code{__Decimal128} respectively.
+
+The @code{__builtin_dfp_dtstsfi_ov} function returns a non-zero value
+if and only if its @code{value} argument has an undefined number of
+significant digits, such as when @code{value} is an encoding of @code{NaN}.
+The @code{__builtin_dfp_dtstsfi_ov_dd} and
+@code{__builtin_dfp_dtstsfi_ov_td} functions behave similarly, but
+require that the type of the @code{value} argument be
+@code{__Decimal64} and @code{__Decimal128} respectively.
+
 The following built-in functions are available for the PowerPC family
 of processors when hardware decimal floating point
 (@option{-mhard-dfp}) is available:
index 216f61fd8210cfed6af91c900bde9a6035b38368..4081bd6846b96d63d2e5a43570aa91c50617d17a 100644 (file)
@@ -1,3 +1,87 @@
+2016-06-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
+
+       * gcc.target/powerpc/dfp/dfp.exp: New dejagnu test script.
+       * gcc.target/powerpc/dfp/dtstsfi-0.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-1.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-10.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-11.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-12.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-13.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-14.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-15.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-16.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-17.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-18.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-19.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-2.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-20.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-21.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-22.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-23.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-24.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-25.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-26.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-27.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-28.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-29.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-3.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-30.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-31.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-32.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-33.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-34.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-35.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-36.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-37.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-38.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-39.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-4.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-40.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-41.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-42.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-43.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-44.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-45.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-46.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-47.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-48.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-49.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-5.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-50.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-51.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-52.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-53.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-54.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-55.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-56.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-57.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-58.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-59.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-6.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-60.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-61.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-62.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-63.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-64.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-65.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-66.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-67.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-68.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-69.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-7.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-70.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-71.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-72.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-73.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-74.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-75.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-76.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-77.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-78.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-79.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-8.c: New test.
+       * gcc.target/powerpc/dfp/dtstsfi-9.c: New test.
+
 2016-06-30  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
             James Greenhalgh  <james.greenhalgh@arm.com>
 
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp b/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp
new file mode 100644 (file)
index 0000000..081946f
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright (C) 2014-2016 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# Exit immediately if this isn't a PowerPC target.
+if { ![istarget powerpc*-*-*] && ![istarget rs6000-*-*] } then {
+  return
+}
+
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+  set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+load_lib torture-options.exp
+
+# Initialize.
+dg-init
+
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c*]] "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-0.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-0.c
new file mode 100644 (file)
index 0000000..29859c5
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-1.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-1.c
new file mode 100644 (file)
index 0000000..d634a2a
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_lt_dd requires" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-10.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-10.c
new file mode 100644 (file)
index 0000000..a56f19b
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt_dd (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-11.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-11.c
new file mode 100644 (file)
index 0000000..523face
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt_dd (5, source);      /* { dg-error "Builtin function __builtin_dtstsfi_lt_dd requires" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-12.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-12.c
new file mode 100644 (file)
index 0000000..e62e4bc
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt_dd (65, source);     /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-13.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-13.c
new file mode 100644 (file)
index 0000000..38bff16
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  if (__builtin_dfp_dtstsfi_lt_dd (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-14.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-14.c
new file mode 100644 (file)
index 0000000..57fc81a
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt_dd (significance, source);   /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-15.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-15.c
new file mode 100644 (file)
index 0000000..990461f
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt_td (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-16.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-16.c
new file mode 100644 (file)
index 0000000..dcd4a16
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt_td (5, source);      /* { dg-error "Builtin function __builtin_dtstsfi_lt_td requires" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-17.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-17.c
new file mode 100644 (file)
index 0000000..5fbf5b5
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt_td (65, source);     /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-18.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-18.c
new file mode 100644 (file)
index 0000000..6751095
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  if (__builtin_dfp_dtstsfi_lt_td (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-19.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-19.c
new file mode 100644 (file)
index 0000000..d24eb10
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt_td (significance, source);   /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-2.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-2.c
new file mode 100644 (file)
index 0000000..d66ba88
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt (65, source);        /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-20.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-20.c
new file mode 100644 (file)
index 0000000..e42f0de
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-21.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-21.c
new file mode 100644 (file)
index 0000000..975843c
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_gt_dd requires" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-22.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-22.c
new file mode 100644 (file)
index 0000000..d6eced7
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt (65, source);        /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-23.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-23.c
new file mode 100644 (file)
index 0000000..eccca7e
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  if (__builtin_dfp_dtstsfi_gt (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-24.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-24.c
new file mode 100644 (file)
index 0000000..54f1cd3
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt (significance, source);      /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-25.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-25.c
new file mode 100644 (file)
index 0000000..0c6594e
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-26.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-26.c
new file mode 100644 (file)
index 0000000..e30c2f4
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_gt_td requires" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-27.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-27.c
new file mode 100644 (file)
index 0000000..aaa0a85
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt (65, source);        /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-28.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-28.c
new file mode 100644 (file)
index 0000000..efec051
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  if (__builtin_dfp_dtstsfi_gt (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-29.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-29.c
new file mode 100644 (file)
index 0000000..2f84bbf
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt (significance, source);      /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-3.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-3.c
new file mode 100644 (file)
index 0000000..ac03809
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  if (__builtin_dfp_dtstsfi_lt (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-30.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-30.c
new file mode 100644 (file)
index 0000000..cfa8d0d
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt_dd (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-31.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-31.c
new file mode 100644 (file)
index 0000000..a95dcb8
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt_dd (5, source);      /* { dg-error "Builtin function __builtin_dtstsfi_gt_dd requires" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-32.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-32.c
new file mode 100644 (file)
index 0000000..512e157
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt_dd (65, source);     /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-33.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-33.c
new file mode 100644 (file)
index 0000000..f21399e
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  if (__builtin_dfp_dtstsfi_gt_dd (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-34.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-34.c
new file mode 100644 (file)
index 0000000..8642283
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt_dd (significance, source);   /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-35.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-35.c
new file mode 100644 (file)
index 0000000..5987b43
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt_td (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-36.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-36.c
new file mode 100644 (file)
index 0000000..00be538
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt_td (5, source);      /* { dg-error "Builtin function __builtin_dtstsfi_gt_td requires" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-37.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-37.c
new file mode 100644 (file)
index 0000000..dcbde72
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt_td (65, source);     /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-38.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-38.c
new file mode 100644 (file)
index 0000000..c892c10
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  if (__builtin_dfp_dtstsfi_gt_td (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-39.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-39.c
new file mode 100644 (file)
index 0000000..d54138d
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_gt_td (significance, source);   /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-4.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-4.c
new file mode 100644 (file)
index 0000000..f00756a
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt (significance, source);      /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-40.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-40.c
new file mode 100644 (file)
index 0000000..6b2ecf7
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-41.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-41.c
new file mode 100644 (file)
index 0000000..c84387d
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_eq_dd requires" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-42.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-42.c
new file mode 100644 (file)
index 0000000..f193b41
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq (65, source);        /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-43.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-43.c
new file mode 100644 (file)
index 0000000..0de23f4
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  if (__builtin_dfp_dtstsfi_eq (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-44.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-44.c
new file mode 100644 (file)
index 0000000..41652c9
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq (significance, source);      /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-45.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-45.c
new file mode 100644 (file)
index 0000000..4ef2d55
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-46.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-46.c
new file mode 100644 (file)
index 0000000..f1d6e2d
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_eq_td requires" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-47.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-47.c
new file mode 100644 (file)
index 0000000..c85b709
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq (65, source);        /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-48.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-48.c
new file mode 100644 (file)
index 0000000..94962fc
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  if (__builtin_dfp_dtstsfi_eq (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-49.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-49.c
new file mode 100644 (file)
index 0000000..79190d0
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq (significance, source);      /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-5.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-5.c
new file mode 100644 (file)
index 0000000..2aadb7e
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-50.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-50.c
new file mode 100644 (file)
index 0000000..3d9869d
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq_dd (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-51.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-51.c
new file mode 100644 (file)
index 0000000..58f5426
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq_dd (5, source);      /* { dg-error "Builtin function __builtin_dtstsfi_eq_dd requires" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-52.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-52.c
new file mode 100644 (file)
index 0000000..382fdc2
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq_dd (65, source);     /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-53.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-53.c
new file mode 100644 (file)
index 0000000..067c207
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  if (__builtin_dfp_dtstsfi_eq_dd (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-54.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-54.c
new file mode 100644 (file)
index 0000000..ac2c692
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq_dd (significance, source);   /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-55.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-55.c
new file mode 100644 (file)
index 0000000..cd732fb
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq_td (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-56.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-56.c
new file mode 100644 (file)
index 0000000..7efb1a3
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq_td (5, source);      /* { dg-error "Builtin function __builtin_dtstsfi_eq_td requires" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-57.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-57.c
new file mode 100644 (file)
index 0000000..74ff7ec
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq_td (65, source);     /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c
new file mode 100644 (file)
index 0000000..d6ee4f7
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  if (__builtin_dfp_dtstsfi_eq_td (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-59.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-59.c
new file mode 100644 (file)
index 0000000..acd2a20
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_eq_td (significance, source);   /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-6.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-6.c
new file mode 100644 (file)
index 0000000..1bddb65
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_lt_td requires" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-60.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-60.c
new file mode 100644 (file)
index 0000000..71eab26
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-61.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-61.c
new file mode 100644 (file)
index 0000000..247c144
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_ov_dd requires" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-62.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-62.c
new file mode 100644 (file)
index 0000000..fbe137d
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov (65, source);        /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-63.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-63.c
new file mode 100644 (file)
index 0000000..18d17f3
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  if (__builtin_dfp_dtstsfi_ov (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-64.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-64.c
new file mode 100644 (file)
index 0000000..6e60116
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov (significance, source);      /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-65.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-65.c
new file mode 100644 (file)
index 0000000..2ad9331
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-66.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-66.c
new file mode 100644 (file)
index 0000000..69272ac
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_ov_td requires" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-67.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-67.c
new file mode 100644 (file)
index 0000000..a9ba111
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov (65, source);        /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-68.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-68.c
new file mode 100644 (file)
index 0000000..bd8040a
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  if (__builtin_dfp_dtstsfi_ov (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-69.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-69.c
new file mode 100644 (file)
index 0000000..078f232
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov (significance, source);      /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-7.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-7.c
new file mode 100644 (file)
index 0000000..1875741
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt (65, source);        /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-70.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-70.c
new file mode 100644 (file)
index 0000000..f84faf8
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov_dd (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-71.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-71.c
new file mode 100644 (file)
index 0000000..3e51203
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov_dd (5, source);      /* { dg-error "Builtin function __builtin_dtstsfi_ov_dd requires" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-72.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-72.c
new file mode 100644 (file)
index 0000000..044d039
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov_dd (65, source);     /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-73.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-73.c
new file mode 100644 (file)
index 0000000..52a5d9a
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p)
+{
+  _Decimal64 source = *p;
+
+  if (__builtin_dfp_dtstsfi_ov_dd (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfi" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-74.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-74.c
new file mode 100644 (file)
index 0000000..2dd72ee
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
+{
+  _Decimal64 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov_dd (significance, source);   /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-75.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-75.c
new file mode 100644 (file)
index 0000000..6bbe73b
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+/* This test should succeed on both 32- and 64-bit configurations.  */
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov_td (5, source);
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-76.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-76.c
new file mode 100644 (file)
index 0000000..572897f
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov_td (5, source);      /* { dg-error "Builtin function __builtin_dtstsfi_ov_td requires" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-77.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-77.c
new file mode 100644 (file)
index 0000000..4b72537
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov_td (65, source);     /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-78.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-78.c
new file mode 100644 (file)
index 0000000..c302027
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  if (__builtin_dfp_dtstsfi_ov_td (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-79.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-79.c
new file mode 100644 (file)
index 0000000..789b3ad
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_ov_td (significance, source);   /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-8.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-8.c
new file mode 100644 (file)
index 0000000..d3aa64e
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+  _Decimal128 source = *p;
+
+  if (__builtin_dfp_dtstsfi_lt (63, source))
+    return 3;
+  else
+    return 5;
+}
+
+/* { dg-final { scan-assembler    "dtstsfiq" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-9.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-9.c
new file mode 100644 (file)
index 0000000..9180e3e
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
+{
+  _Decimal128 source = *p;
+
+  return __builtin_dfp_dtstsfi_lt (significance, source);      /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+}