From patchwork Wed Sep 7 16:05:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 75685 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp400158qgf; Wed, 7 Sep 2016 09:06:32 -0700 (PDT) X-Received: by 10.66.43.113 with SMTP id v17mr58771723pal.112.1473264392753; Wed, 07 Sep 2016 09:06:32 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id j192si22458340pfc.151.2016.09.07.09.06.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Sep 2016 09:06:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-435431-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-435431-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-435431-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=Ahj5B1WykMqIq4eXILkJCqfanzk01DzzaUq6M+SQ0HQPRsM4rR j7tsm8F77E8kXOYHjDeOrH6ZOSsP0uWnL/YRQMmBcCbEi55APNaaqJ4WBn83lOlZ u4wISpSnEb1sOv0Xt6JqhQoer2Qfeb32EX42iHiriohya8LbN6GNl0RKI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=ZvEGmHIQu08GQDdY91jzQ4QOzGc=; b=xIloMWnbCVWGGbT/ffi2 GO+oJzi6tB8zUU9g2d8/0cAY1x2VrO4WUMV/x6i1E0LtwoW2qWtEW/eM7l0T9TUC tCKyIL2EA5v4iQmdLFdPokQYeb7Fx7OTS8w16i+yhIuxeJqZtFcytdZdRJSISzaW DcIwHup/yly+82a7t+GKJ3E= Received: (qmail 31536 invoked by alias); 7 Sep 2016 16:06:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 31525 invoked by uid 89); 7 Sep 2016 16:06:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=_Complex, _complex, 4246, 424, 6 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Sep 2016 16:06:08 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03lp0088.outbound.protection.outlook.com [94.245.120.88]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-45-3LcfuEydNsSOkggkVVCjOQ-1; Wed, 07 Sep 2016 17:06:04 +0100 Received: from AM4PR08CA0028.eurprd08.prod.outlook.com (10.166.127.38) by VI1PR0801MB1502.eurprd08.prod.outlook.com (10.167.210.140) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9; Wed, 7 Sep 2016 16:06:03 +0000 Received: from DB3FFO11FD039.protection.gbl (2a01:111:f400:7e04::119) by AM4PR08CA0028.outlook.office365.com (2603:10a6:200:1a::38) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9 via Frontend Transport; Wed, 7 Sep 2016 16:06:03 +0000 Received: from nebula.arm.com (217.140.96.140) by DB3FFO11FD039.mail.protection.outlook.com (10.47.217.70) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.6 via Frontend Transport; Wed, 7 Sep 2016 16:06:02 +0000 Received: from e107456-lin.cambridge.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.294.0; Wed, 7 Sep 2016 17:05:39 +0100 From: James Greenhalgh To: CC: , Subject: [Patch libgcc] Enable HCmode multiply and divide (mulhc3/divhc3) Date: Wed, 7 Sep 2016 17:05:38 +0100 Message-ID: <1473264338-7875-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(377424004)(189002)(199003)(8676002)(7846002)(5660300001)(626004)(2476003)(106466001)(356003)(2351001)(87936001)(229853001)(92566002)(50226002)(568964002)(4610100001)(5000100001)(19580395003)(2906002)(36756003)(512874002)(305945005)(8936002)(84326002)(86362001)(5890100001)(19580405001)(110136002)(11100500001)(50986999)(4326007)(33646002)(77096005)(189998001)(26826002)(104016004)(246002)(586003)(7696003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1502; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD039; 1:9VxbcEYhdwpI0TVfHN2f/66U6Fj1evDpdWvY2BVvOqQYHeIZCWeQ4f9LrIf6rz3FgPk6Na1fYxiLifG+5N/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exchange-Diagnostics: 1; VI1PR0801MB1502; 31:81a9saKl1jm/QozZK1eWWPtfWlyYLgeWRyrWVpTxWJnYwKNWX8OVMjYQh3aijYo3Kvow7SGyuEAY76ZbDwLHFZn7bj//BybBsBm1ushg0tx0uHT0Bn63FSyfolCZQiNOkOdH0x2I1LKT56fOnE4yQRkG1M9Q5v6Zuz8XDBhGe8EN6r42ceJRzyy1DfjFYE+rBm6viWsLBPweS7zBS9mx6otDE8MeeIx+g8BMqeSmRvFUCvOTZGIF4xh8X/XcSDNy; 20:ZBbvWPTIZO40GYfkjLBVVmrMwZ0Es7PcCrZNxqPqJ7ty2G8mg2rCiXtRAZxYewk2CfBgITc8Cz64PNOM2rgqorzkVir8LJyCbOruC3n8e/XuRS7OCkMrrwDwvREGCbwHJBX6CU1F8E1HqQ4yg2KUc/O+/BQeqbiL/Iqh+E/7Pc+dKDbIgTzTPQUS5qnDMrXwDnXDjDEZuW0JHe3kby2EroQcrO2mGWjGLg4CM+wFK++bICzeq3nJ6TQpTRG9Nau8 NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415321)(6040176)(601004)(2401047)(13020025)(13024025)(13023025)(13013025)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:VI1PR0801MB1502; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB1502; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1502; 4:1g02qbh2qX7iDUfJqpOjPLUBAaCx+5/d0oVyZEJ/yPi9d+aYQJC/4zcYFVNJ+Vhf2ZIRTuSJ86dTcnIsLLUiGPYqZygYcdHrfLdfCYNGfgzg9zfeo9YmQzguJf9pfkPu+mDQ4EGYPNRSTXxGIHouzVhEh81L+lHqUpRHInPxzp2N8IQyJS538YTVBrjttdcuuWYVtaZX/W1jwO42mVVBZ/0T5CFvf0ZNotNR37qfrCDyWPiXduJZ9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Ffk6mhyf?= =?us-ascii?Q?tVN1196nOXr5kG2HMbLx9AYKPATeOuUqhrNwMvsYL8UEZ10Kh44EEpxxUbUT?= =?us-ascii?Q?IKDDZsdPd2SxJMA9dCKYk0f05iWRVpi/rsK8ym+cqcLvr8RfXMbL2Vx3IGbM?= =?us-ascii?Q?+0apwvk3ZUu3acNwUN+3MrsfgDVEHEfNWMqdlJTExe+Ebp1ajyaTO5C6UYhh?= =?us-ascii?Q?c95+gD2MvblaeOyREXluA3kM+E42gBebL44cUo/TQzCfw/9JwAHRvb392Mrf?= =?us-ascii?Q?rISQrrB9eaI5nV5rRVWCbbliTFAFz3qepCvVHcw2imyQi5XQCzM1U7B1g7Hp?= =?us-ascii?Q?ZPMXwOeCs+TWuD/GgNCWJVy1WsyJ4tqfVSH3RECAc5ZzbGQ5dO09zCUkRH/u?= =?us-ascii?Q?iRze7bai71NNJegLYm5HADVDrplpkhE9rk/4yIuHKGdNXxbo18EdDa5Dw2GN?= =?us-ascii?Q?RRF53OGN0Td5NqOUq5FxbJFRXLqFbjSf26RnzycbekKMXUyOAHRdB6rN3NIo?= =?us-ascii?Q?UsPWr74q/ErT5Aq9rtYiRA80iKO7r4fVIM6IqSuNT5RtJW44Lex5PB3CLRN8?= =?us-ascii?Q?WzeYWetRB2sY=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1502; 6:Ug87VtXwBhHbuagjWId8C0TrY7m37dimvOut3HjrRTHxlBhpSoA9P59NcsbMNKGIqxptyZTkYIF0TvQgRquRKTKSr82bAVxru3pN7TmxPj9pAiaU2oOcPG3X4LoMq5KXacCxnnwCJBZH24pPsF+w6tXpsCpAeuA6p6krK69HzKPuKxdttinD+HscTGukZk5f59rTMGTXYLWyG7VlGFWur6R/PzrP7cCCJpxVSAci6xsBK/uZzQBNwEPZXYw5xggEjTT+VHesFvfNY60XY+bSGguduoUznr3/9Yt8a2k6HX3zUsZM9WNGgowmI0+EZnBXsZQRkGZDtZHfs1JrgIszqw==; 5:LXFUh9EZyY485tnUCG48k4d1zcnziLWec1yOGTMlb8IrQSriuAJisE7B+KtCiO+4CNLstP8Xp1czrmf7rklFM2NKtfK92vWou+WPaSmCy+OdIyaIEjV1qN7Y3xeF2ZbVmxTdNv5S3yZWcUc8ee2n7w==; 24:mIVRgy3irJqq5lkCXu4rXAvx8szia+vEaqyFROH6mlBwycJfo5LcsvIAdQ4zd1O2bIEOQr6m9SGQUU/+/YVYZD4lpW6D1ugCpAvlanD0j4c=; 7:4INoWQaBuU/XZOl7I7Gc6QlDmJ6L4U74KRc73fQGiMBiWMDUAjn23mRpDCLT9uvNMsZG1VliPhBwRC7mmdOwglBIURXd0e4UKhg4hs8gKcICRMS5powOlCJTLymzepQJePWJQczdO1omaWoUdhrwRRpKqNdK+eZhLskpGDRT/lSJdZPYOTiycnABfQz8Qiv86p7jsDLzdWdJIxuI/Syuk/MxlTattjnQhg5qDTbnjCT9ZqD3+B6Y260JuCUwQOIv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1502; 20:ASvA1x4MWqTbGcP72p7FN/DySY4R8zdfsIhWZ3Sj48jlLupVIz6lIyRjV7db8G04sTG+yVMa9hXe6m4/8hDms9H1k1SM68gx4OCGiMLTPQmM/ClxTowoqeyJrUN6G+jcsmP2gdJzlsr8jspt7tbRz4MjPlEqOfOyXcc/W/W6jpk= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2016 16:06:02.5793 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1502 X-MC-Unique: 3LcfuEydNsSOkggkVVCjOQ-1 X-IsSubscribed: yes Hi, This patch arranges for half-precision complex multiply and divide routines to be built if __LIBGCC_HAS_HF_MODE__. This will be true if the target supports the _Float16 type. OK? Thanks, James --- libgcc/ 2016-09-07 James Greenhalgh * Makefile.in (lib2funcs): Build _mulhc3 and _divhc3. * libgcc2.h (LIBGCC_HAS_HF_MODE): Conditionally define. (HFtype): Likewise. (HCtype): Likewise. (__divhc3): Likewise. (__mulhc3): Likewise. * libgcc2.c: Support _mulhc3 and _divhc3. diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index ba37c65..53e3ea2 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -414,8 +414,9 @@ lib2funcs = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2 \ _negvsi2 _negvdi2 _ctors _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 \ _ctzsi2 _ctzdi2 _popcount_tab _popcountsi2 _popcountdi2 \ _paritysi2 _paritydi2 _powisf2 _powidf2 _powixf2 _powitf2 \ - _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 _divxc3 \ - _divtc3 _bswapsi2 _bswapdi2 _clrsbsi2 _clrsbdi2 + _mulhc3 _mulsc3 _muldc3 _mulxc3 _multc3 _divhc3 _divsc3 \ + _divdc3 _divxc3 _divtc3 _bswapsi2 _bswapdi2 _clrsbsi2 \ + _clrsbdi2 # The floating-point conversion routines that involve a single-word integer. # XX stands for the integer mode. diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c index 0a716bf..ec3b21f 100644 --- a/libgcc/libgcc2.c +++ b/libgcc/libgcc2.c @@ -1852,7 +1852,8 @@ NAME (TYPE x, int m) #endif -#if ((defined(L_mulsc3) || defined(L_divsc3)) && LIBGCC2_HAS_SF_MODE) \ +#if((defined(L_mulhc3) || defined(L_divhc3)) && LIBGCC2_HAS_HF_MODE) \ + || ((defined(L_mulsc3) || defined(L_divsc3)) && LIBGCC2_HAS_SF_MODE) \ || ((defined(L_muldc3) || defined(L_divdc3)) && LIBGCC2_HAS_DF_MODE) \ || ((defined(L_mulxc3) || defined(L_divxc3)) && LIBGCC2_HAS_XF_MODE) \ || ((defined(L_multc3) || defined(L_divtc3)) && LIBGCC2_HAS_TF_MODE) @@ -1861,7 +1862,13 @@ NAME (TYPE x, int m) #undef double #undef long -#if defined(L_mulsc3) || defined(L_divsc3) +#if defined(L_mulhc3) || defined(L_divhc3) +# define MTYPE HFtype +# define CTYPE HCtype +# define MODE hc +# define CEXT __LIBGCC_HF_FUNC_EXT__ +# define NOTRUNC __LIBGCC_HF_EXCESS_PRECISION__ +#elif defined(L_mulsc3) || defined(L_divsc3) # define MTYPE SFtype # define CTYPE SCtype # define MODE sc @@ -1922,7 +1929,7 @@ extern void *compile_type_assert[sizeof(INFINITY) == sizeof(MTYPE) ? 1 : -1]; # define TRUNC(x) __asm__ ("" : "=m"(x) : "m"(x)) #endif -#if defined(L_mulsc3) || defined(L_muldc3) \ +#if defined(L_mulhc3) || defined(L_mulsc3) || defined(L_muldc3) \ || defined(L_mulxc3) || defined(L_multc3) CTYPE @@ -1992,7 +1999,7 @@ CONCAT3(__mul,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d) } #endif /* complex multiply */ -#if defined(L_divsc3) || defined(L_divdc3) \ +#if defined(L_divhc3) || defined(L_divsc3) || defined(L_divdc3) \ || defined(L_divxc3) || defined(L_divtc3) CTYPE diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h index 72bb873..c46fb77 100644 --- a/libgcc/libgcc2.h +++ b/libgcc/libgcc2.h @@ -34,6 +34,12 @@ extern void __clear_cache (char *, char *); extern void __eprintf (const char *, const char *, unsigned int, const char *) __attribute__ ((__noreturn__)); +#ifdef __LIBGCC_HAS_HF_MODE__ +#define LIBGCC2_HAS_HF_MODE 1 +#else +#define LIBGCC2_HAS_HF_MODE 0 +#endif + #ifdef __LIBGCC_HAS_SF_MODE__ #define LIBGCC2_HAS_SF_MODE 1 #else @@ -133,6 +139,10 @@ typedef unsigned int UTItype __attribute__ ((mode (TI))); #endif #endif +#if LIBGCC2_HAS_HF_MODE +typedef float HFtype __attribute__ ((mode (HF))); +typedef _Complex float HCtype __attribute__ ((mode (HC))); +#endif #if LIBGCC2_HAS_SF_MODE typedef float SFtype __attribute__ ((mode (SF))); typedef _Complex float SCtype __attribute__ ((mode (SC))); @@ -424,6 +434,10 @@ extern SItype __negvsi2 (SItype); #endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */ #undef int +#if LIBGCC2_HAS_HF_MODE +extern HCtype __divhc3 (HFtype, HFtype, HFtype, HFtype); +extern HCtype __mulhc3 (HFtype, HFtype, HFtype, HFtype); +#endif #if LIBGCC2_HAS_SF_MODE extern DWtype __fixsfdi (SFtype); extern SFtype __floatdisf (DWtype);