From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25002 invoked by alias); 11 Jul 2016 21:25:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 24993 invoked by uid 89); 11 Jul 2016 21:25:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=AWL,BAYES_50,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=King, confdefsh, ac_arg_enable, AS_HELP_STRING X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 11 Jul 2016 21:25:07 +0000 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6BLJ7WZ098948 for ; Mon, 11 Jul 2016 17:25:05 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0b-001b2d01.pphosted.com with ESMTP id 243eucswp7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 11 Jul 2016 17:25:04 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 11 Jul 2016 17:25:04 -0400 Received: from d01dlp01.pok.ibm.com (9.56.250.166) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 11 Jul 2016 17:25:02 -0400 X-IBM-Helo: d01dlp01.pok.ibm.com X-IBM-MailFrom: meissner@ibm-tiger.the-meissners.org Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 3B7EE38C8039; Mon, 11 Jul 2016 17:25:02 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u6BLP4LR12255522; Mon, 11 Jul 2016 21:25:04 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 18C932803D; Mon, 11 Jul 2016 17:25:02 -0400 (EDT) Received: from ibm-tiger.the-meissners.org (unknown [9.32.77.111]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP id F10AF28071; Mon, 11 Jul 2016 17:25:01 -0400 (EDT) Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id 5C2CD4429D; Mon, 11 Jul 2016 17:25:01 -0400 (EDT) Date: Mon, 11 Jul 2016 21:25:00 -0000 From: Michael Meissner To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt Subject: Re: [PATCH], PowerPC support to enable -mlra and/or -mfloat128 Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt References: <20160711200701.GA21095@ibm-tiger.the-meissners.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20160711200701.GA21095@ibm-tiger.the-meissners.org> User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16071121-0044-0000-0000-000000A03A3F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16071121-0045-0000-0000-000004B65603 Message-Id: <20160711212501.GA10255@ibm-tiger.the-meissners.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-11_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607110211 X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00581.txt.bz2 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 729 Sigh, I keep forgetting to attach the patch. 2016-07-11 Michael Meissner * doc/install.texi (Configuration): Document PowerPC specific configuration options --enable-lra and --enable-float128. * configure.ac: Add --enable-lra and --enable-float128 to turn on -mlra and -mfloat128 by default in the PowerPC compiler. * configure: Regenerate. * config.gcc (powerpc*-*-linux*): Add --enable-lra and --enable-float128 support. * config/rs6000/rs6000.c (rs6000_option_override_internal): Add support for --enable-lra and --enable-float128. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gcc-power9.patch146b" Content-length: 5636 Index: gcc/doc/install.texi =================================================================== --- gcc/doc/install.texi (revision 238170) +++ gcc/doc/install.texi (working copy) @@ -1661,6 +1661,26 @@ Using the GNU Compiler Collection (GCC)} See ``RS/6000 and PowerPC Options'' in the main manual @end ifhtml +@item --enable-lra +This option enables @option{-mlra} by default for powerpc-linux. +@ifnothtml +@xref{RS/6000 and PowerPC Options,, RS/6000 and PowerPC Options, gcc, +Using the GNU Compiler Collection (GCC)}, +@end ifnothtml +@ifhtml +See ``RS/6000 and PowerPC Options'' in the main manual +@end ifhtml + +@item --enable-float128 +This option enables @option{-mfloat128} by default for powerpc-linux. +@ifnothtml +@xref{RS/6000 and PowerPC Options,, RS/6000 and PowerPC Options, gcc, +Using the GNU Compiler Collection (GCC)}, +@end ifnothtml +@ifhtml +See ``RS/6000 and PowerPC Options'' in the main manual +@end ifhtml + @item --enable-default-ssp Turn on @option{-fstack-protector-strong} by default. Index: gcc/configure =================================================================== --- gcc/configure (revision 238170) +++ gcc/configure (working copy) @@ -918,6 +918,8 @@ enable_rpath with_libiconv_prefix enable_sjlj_exceptions enable_secureplt +enable_lra +enable_float128 enable_leading_mingw64_underscores enable_cld enable_frame_pointer @@ -1630,6 +1632,9 @@ Optional Features: --enable-sjlj-exceptions arrange to use setjmp/longjmp exception handling --enable-secureplt enable -msecure-plt by default for PowerPC + --enable-lra enable -mlra by default for PowerPC + --enable-float128 enable -mfloat128 by default for PowerPC on Linux + VSX systems --enable-leading-mingw64-underscores enable leading underscores on 64 bit mingw targets --enable-cld enable -mcld by default for 32bit x86 @@ -11984,6 +11989,18 @@ if test "${enable_secureplt+set}" = set; fi +# Check whether --enable-lra was given. +if test "${enable_lra+set}" = set; then : + enableval=$enable_lra; +fi + + +# Check whether --enable-float128 was given. +if test "${enable_float128+set}" = set; then : + enableval=$enable_float128; +fi + + # Check whether --enable-leading-mingw64-underscores was given. if test "${enable_leading_mingw64_underscores+set}" = set; then : enableval=$enable_leading_mingw64_underscores; @@ -18475,7 +18492,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18478 "configure" +#line 18495 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18581,7 +18598,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18584 "configure" +#line 18601 "configure" #include "confdefs.h" #if HAVE_DLFCN_H Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 238170) +++ gcc/configure.ac (working copy) @@ -1798,6 +1798,17 @@ AC_ARG_ENABLE(secureplt, [enable -msecure-plt by default for PowerPC])], [], []) +AC_ARG_ENABLE(lra, +[AS_HELP_STRING([--enable-lra], + [enable -mlra by default for PowerPC])], +[], []) + +AC_ARG_ENABLE(float128, +[AS_HELP_STRING([--enable-float128], + [enable -mfloat128 by default for PowerPC on Linux VSX + systems])], +[], []) + AC_ARG_ENABLE(leading-mingw64-underscores, AS_HELP_STRING([--enable-leading-mingw64-underscores], [enable leading underscores on 64 bit mingw targets]), Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 238170) +++ gcc/config.gcc (working copy) @@ -2414,6 +2414,12 @@ powerpc*-*-linux*) if test x${enable_secureplt} = xyes; then tm_file="rs6000/secureplt.h ${tm_file}" fi + if test x${enable_lra} = xyes; then + tm_defines="${tm_defines} ENABLE_LRA=1" + fi + if test x${enable_float128} = xyes; then + tm_defines="${tm_defines} ENABLE_FLOAT128=1" + fi ;; powerpc-wrs-vxworks|powerpc-wrs-vxworksae|powerpc-wrs-vxworksmils) tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h" Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 238170) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -4306,6 +4306,17 @@ rs6000_option_override_internal (bool gl rs6000_isa_flags &= ~OPTION_MASK_P9_VECTOR; } + /* Enable LRA if the compiler was configured with --enable-lra. */ +#ifdef ENABLE_LRA + if ((rs6000_isa_flags_explicit & OPTION_MASK_LRA) == 0) + { + if (ENABLE_LRA) + rs6000_isa_flags |= OPTION_MASK_LRA; + else + rs6000_isa_flags &= ~OPTION_MASK_LRA; + } +#endif + /* There have been bugs with -mvsx-timode that don't show up with -mlra, but do show up with -mno-lra. Given -mlra will become the default once PR 69847 is fixed, turn off the options with problems by default if @@ -4372,6 +4383,17 @@ rs6000_option_override_internal (bool gl } } + /* Enable FLOAT128 if the compiler was configured with --enable-float128. */ +#ifdef ENABLE_FLOAT128 + if (TARGET_VSX && (rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128) == 0) + { + if (ENABLE_FLOAT128) + rs6000_isa_flags |= OPTION_MASK_FLOAT128; + else + rs6000_isa_flags &= ~(OPTION_MASK_FLOAT128 | OPTION_MASK_FLOAT128_HW); + } +#endif + /* __float128 requires VSX support. */ if (TARGET_FLOAT128 && !TARGET_VSX) { --EeQfGwPcQSOJBaQU--