aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/rs6000-builtin.def
diff options
context:
space:
mode:
authorPeter Bergner <bergner@gcc.gnu.org>2018-03-28 19:06:31 -0500
committerPeter Bergner <bergner@gcc.gnu.org>2018-03-28 19:06:31 -0500
commiteb581af430ff929eb43e2fbf871e9a92e25780c5 (patch)
tree22a74be11bfec563f65594b6d47ed41ae6db92c1 /gcc/config/rs6000/rs6000-builtin.def
parent604e36ed96b2136fc24edecf675235c39fcfd6de (diff)
downloadgcc-eb581af430ff929eb43e2fbf871e9a92e25780c5.zip
gcc-eb581af430ff929eb43e2fbf871e9a92e25780c5.tar.gz
gcc-eb581af430ff929eb43e2fbf871e9a92e25780c5.tar.bz2
re PR target/84912 (__builtin_divde* produce Internal Compiler Error when compiled -m32)
PR target/84912 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define. (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64. * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support for RS6000_BTM_POWERPC64. (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64. * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro definition. (DIVDE): Use it. (DIVDEU): Likewise. From-SVN: r258943
Diffstat (limited to 'gcc/config/rs6000/rs6000-builtin.def')
-rw-r--r--gcc/config/rs6000/rs6000-builtin.def13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def
index 5bb30aa..37f170d 100644
--- a/gcc/config/rs6000/rs6000-builtin.def
+++ b/gcc/config/rs6000/rs6000-builtin.def
@@ -635,6 +635,15 @@
| RS6000_BTC_BINARY), \
CODE_FOR_ ## ICODE) /* ICODE */
+#define BU_P7_POWERPC64_MISC_2(ENUM, NAME, ATTR, ICODE) \
+ RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
+ "__builtin_" NAME, /* NAME */ \
+ RS6000_BTM_POPCNTD \
+ | RS6000_BTM_POWERPC64, /* MASK */ \
+ (RS6000_BTC_ ## ATTR /* ATTR */ \
+ | RS6000_BTC_BINARY), \
+ CODE_FOR_ ## ICODE) /* ICODE */
+
#define BU_P7_MISC_X(ENUM, NAME, ATTR) \
RS6000_BUILTIN_X (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
"__builtin_" NAME, /* NAME */ \
@@ -2297,8 +2306,8 @@ BU_P9V_OVERLOAD_1 (VCTZLSBB, "vctzlsbb")
/* 2 argument extended divide functions added in ISA 2.06. */
BU_P7_MISC_2 (DIVWE, "divwe", CONST, dive_si)
BU_P7_MISC_2 (DIVWEU, "divweu", CONST, diveu_si)
-BU_P7_MISC_2 (DIVDE, "divde", CONST, dive_di)
-BU_P7_MISC_2 (DIVDEU, "divdeu", CONST, diveu_di)
+BU_P7_POWERPC64_MISC_2 (DIVDE, "divde", CONST, dive_di)
+BU_P7_POWERPC64_MISC_2 (DIVDEU, "divdeu", CONST, diveu_di)
/* 1 argument DFP (decimal floating point) functions added in ISA 2.05. */
BU_DFP_MISC_1 (DXEX, "dxex", CONST, dfp_dxex_dd)