From patchwork Fri Feb 28 07:16:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Ye X-Patchwork-Id: 25511 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B7820203C5 for ; Fri, 28 Feb 2014 07:16:32 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id bj1sf573643pad.3 for ; Thu, 27 Feb 2014 23:16:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:from:to:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:content-type :content-transfer-encoding; bh=2oVgnKdyhmtY00jQAFXnVdY+b3YDKU4PnUADyA0mmro=; b=RuDoJvfWV3ydeSW9ZVOlpfGB4FlWjwKoBaDozwgnDeKdhq+22rAxi/4Z1r775PVv3s ohOGdnnKNvOWDs9EXOCLbH2ttuAaYsj+S5Q8k8qV0nuR2iQo5PPvUTVGk84cpWjn6Iei M9tzj7QbhddEZaSIRqnQahdopNXRB2lIOgK3qS5s7p9g9UqXCVOsfAd1KzRRieJ8AFOa ety8vCcglJNaUNrXhpGp2xRSCTwEeJQOSPbJZxL2LK0AtlsJehkFWqGZbdS5tE5YEGmP jo24uc1A00gxtOMqyEtZXM7IfwkEEblaXRA36ZusxGNUjUTc0DSs5SWPJo5ubSc1jz9c wC5g== X-Gm-Message-State: ALoCoQnemDiqYWQWSVa209cp9U5Vp6W8mjjAfdUcNVsxGu3B5f2CB6p3fAkfa8YYBh9enawgcfU9 X-Received: by 10.66.157.35 with SMTP id wj3mr544311pab.11.1393571791592; Thu, 27 Feb 2014 23:16:31 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.119 with SMTP id d110ls954805qga.32.gmail; Thu, 27 Feb 2014 23:16:31 -0800 (PST) X-Received: by 10.52.119.178 with SMTP id kv18mr323687vdb.63.1393571791369; Thu, 27 Feb 2014 23:16:31 -0800 (PST) Received: from mail-vc0-x236.google.com (mail-vc0-x236.google.com [2607:f8b0:400c:c03::236]) by mx.google.com with ESMTPS id nc1si19498vec.138.2014.02.27.23.16.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Feb 2014 23:16:31 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::236 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c03::236; Received: by mail-vc0-f182.google.com with SMTP id id10so336243vcb.13 for ; Thu, 27 Feb 2014 23:16:31 -0800 (PST) X-Received: by 10.52.26.17 with SMTP id h17mr315826vdg.65.1393571791087; Thu, 27 Feb 2014 23:16:31 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.130.193 with SMTP id u1csp34096vcs; Thu, 27 Feb 2014 23:16:30 -0800 (PST) X-Received: by 10.66.176.143 with SMTP id ci15mr1677185pac.35.1393571790278; Thu, 27 Feb 2014 23:16:30 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id pg1si914856pac.270.2014.02.27.23.16.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Feb 2014 23:16:30 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-362511-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 16003 invoked by alias); 28 Feb 2014 07:16:17 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 15988 invoked by uid 89); 28 Feb 2014 07:16:15 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Feb 2014 07:16:13 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 28 Feb 2014 07:16:10 +0000 Received: from SHAWIN205 ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 28 Feb 2014 07:16:14 +0000 From: "Joey Ye" To: Subject: [PATCH] [libgcc,arm] Fix PR 60166 - NAN fraction bits Date: Fri, 28 Feb 2014 15:16:13 +0800 Message-ID: <002201cf3454$f780bbe0$e68233a0$@arm.com> MIME-Version: 1.0 X-MC-Unique: 114022807161001501 X-Original-Sender: joey.ye@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c03::236 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 This patch is a mirror copy from approved patch in glibc: http://sourceware.org/ml/libc-alpha/2014-02/msg00741.html OK to trunk, 4.8 and 4.7? ChangeLog.libgcc: * config/arm/sfp-machine.h (_FP_NANFRAC_H, _FP_NANFRAC_S, _FP_NANFRAC_D, _FP_NANFRAC_Q): Set to zero. #define _FP_NANSIGN_D 0 diff --git a/libgcc/config/arm/sfp-machine.h b/libgcc/config/arm/sfp-machine.h index bb34895..8d45320 100644 --- a/libgcc/config/arm/sfp-machine.h +++ b/libgcc/config/arm/sfp-machine.h @@ -19,10 +19,12 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); #define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) #define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) -#define _FP_NANFRAC_H ((_FP_QNANBIT_H << 1) - 1) -#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) -#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 -#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 +/* According to RTABI, QNAN is only with the most significant bit of the + significand set, and all other significand bits zero. */ +#define _FP_NANFRAC_H 0 +#define _FP_NANFRAC_S 0 +#define _FP_NANFRAC_D 0, 0 +#define _FP_NANFRAC_Q 0, 0, 0, 0 #define _FP_NANSIGN_H 0 #define _FP_NANSIGN_S 0