From patchwork Wed Oct 18 20:58:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Mezentsev X-Patchwork-Id: 827826 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-464476-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="aTiNsnw6"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yHPz31g4Xz9t3h for ; Thu, 19 Oct 2017 08:17:33 +1100 (AEDT) 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; q=dns; s=default; b=YBRqAo27svVR MhPeGFocIjPelhbfIah4rXA6+jb4iAdFgmbIpv69Kjgy3Jl97ZjP4d6hnf6WclTJ wSLViQmm8vuoudE88qQ5cTciY8jSy9kVBN/ICjtStWzFkHMjIAAIy19CauZeRY9W 0Hl144VQwoqY++n6UfDd8ar3LinY0a8= 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; s=default; bh=3hEy35rXqfh/YUYPkP Htow/+t9E=; b=aTiNsnw61TY9vrm97Ez5EXj8aISyzmn+DztfeJ7HgzdWu9jMZ9 L4N0YcBI4TBInA8vJb8UO3IGRPol4A6zHAupsXBoIZvUtweOtri6ZzgfbRcuvJVx /qEF7rNUDxaG1j5zzyIihVJV2C74P5Wg2FYue23XQAcYd7Lh8d5JOd+Fs= Received: (qmail 42847 invoked by alias); 18 Oct 2017 21:17:25 -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 42836 invoked by uid 89); 18 Oct 2017 21:17:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=HX-Envelope-From:sk:vladimi X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Oct 2017 21:17:24 +0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9ILHLsQ012661 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 18 Oct 2017 21:17:22 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9ILHLq0023892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 18 Oct 2017 21:17:21 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9ILHLTd032411 for ; Wed, 18 Oct 2017 21:17:21 GMT Received: from vmezents.us.oracle.com (/10.147.27.113) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 18 Oct 2017 14:17:21 -0700 From: vladimir.mezentsev@oracle.com To: gcc-patches@gcc.gnu.org Cc: vladimir.mezentsev@oracle.com Subject: [PATCH] PR libgcc/59714 complex division is surprising on aarch64 Date: Wed, 18 Oct 2017 15:58:54 -0500 Message-Id: <1508360334-117000-1-git-send-email-vladimir.mezentsev@oracle.com> From: Vladimir Mezentsev FMA (floating-point multiply-add) instructions are supported on aarch64. These instructions can produce different result if two operations executed separately. -ffp-contract=off doesn't allow the FMA instructions. Tested on two platforms: aarch64-unknown-linux-gnu: No regression. Two failed tests now passed. sparc64-unknown-linux-gnu: No regression. ChangeLog: 2017-10-18 Vladimir Mezentsev PR libgcc/59714 * libgcc/Makefile.in: Add -ffp-contract=off --- libgcc/Makefile.in | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index a1a392d..b771875 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -237,12 +237,16 @@ else DECNUMINC = endif +# Disable floating-point expression contraction +LIBGCC2_FFP_CONTRAST_CFLAGS = -ffp-contract=off + # Options to use when compiling libgcc2.a. # LIBGCC2_DEBUG_CFLAGS = -g LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \ -fbuilding-libgcc -fno-stack-protector \ + $(LIBGCC2_FFP_CONTRAST_CFLAGS) \ $(INHIBIT_LIBC_CFLAGS) # Additional options to use when compiling libgcc2.a.