From patchwork Tue Jan 7 16:23:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Shawcroft X-Patchwork-Id: 22912 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E7A92202E0 for ; Tue, 7 Jan 2014 16:23:50 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id h16sf1462180oag.9 for ; Tue, 07 Jan 2014 08:23:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-post :list-help:sender:delivered-to:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:list-archive; bh=0KdrBsh4OSvOIz3Ic6gSOA0AgvHOABY9G8FHn+Bl8R8=; b=hbN+iUGLHYsRKC4IH8osGKFr5f+94UjgAicndXQmEUXS7tSOpZ5GVtmCjObLTXkcpn l4B6eXGu5aZIZRClv2feX69BfcTXI03vo9FMwRsTpJWPrKrgTuM4IJD+EtMFpvDDEYOE YkcjngRP1z2JAksI1xQgpOwElgBFcDf+m5LCcQBINR3LuKNjGAt5ENSxF+fgWSjy1F1d qXCuqWw8nWZvIjlgoX2PUU8ny48wYKmUUOY2ayzQSTsUGscoTIhV1+ZxcNBLU9kaIBag pXywxQhbqcaB34mBC0LXSwZAM9wyvSVyjLtcb8Kh6dgAV5Hw44T7mw0WRF1daYeBa3rU O4/w== X-Gm-Message-State: ALoCoQkds8gAhPL4HEdjPwas8i+/POg5kycfTfkiatOT/j5UqCPlhD5sGmWRl2yB4eOxw8kVP9ki X-Received: by 10.182.112.231 with SMTP id it7mr48727503obb.22.1389111829753; Tue, 07 Jan 2014 08:23:49 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.138 with SMTP id k10ls155890qek.13.gmail; Tue, 07 Jan 2014 08:23:49 -0800 (PST) X-Received: by 10.49.106.1 with SMTP id gq1mr202002763qeb.12.1389111829631; Tue, 07 Jan 2014 08:23:49 -0800 (PST) Received: from mail-ve0-x236.google.com (mail-ve0-x236.google.com [2607:f8b0:400c:c01::236]) by mx.google.com with ESMTPS id kb1si76782329qeb.151.2014.01.07.08.23.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jan 2014 08:23:49 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::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:c01::236; Received: by mail-ve0-f182.google.com with SMTP id jy13so290632veb.27 for ; Tue, 07 Jan 2014 08:23:49 -0800 (PST) X-Received: by 10.52.53.101 with SMTP id a5mr1627163vdp.80.1389111829379; Tue, 07 Jan 2014 08:23:49 -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.59.13.131 with SMTP id ey3csp169547ved; Tue, 7 Jan 2014 08:23:48 -0800 (PST) X-Received: by 10.66.51.137 with SMTP id k9mr6529505pao.11.1389111828476; Tue, 07 Jan 2014 08:23:48 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id j5si58727954pbs.271.2014.01.07.08.23.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2014 08:23:48 -0800 (PST) Received-SPF: pass (google.com: domain of libc-ports-return-4705-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 22826 invoked by alias); 7 Jan 2014 16:23:45 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Post: , List-Help: , Sender: libc-ports-owner@sourceware.org Delivered-To: mailing list libc-ports@sourceware.org Received: (qmail 22808 invoked by uid 89); 7 Jan 2014 16:23:43 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f171.google.com Received: from mail-wi0-f171.google.com (HELO mail-wi0-f171.google.com) (209.85.212.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 07 Jan 2014 16:23:42 +0000 Received: by mail-wi0-f171.google.com with SMTP id bz8so4363463wib.4 for ; Tue, 07 Jan 2014 08:23:39 -0800 (PST) X-Received: by 10.194.219.232 with SMTP id pr8mr17430320wjc.6.1389111819433; Tue, 07 Jan 2014 08:23:39 -0800 (PST) Received: from localhost.localdomain (mshawcroft.plus.com. [212.159.23.237]) by mx.google.com with ESMTPSA id d2sm4268582wik.11.2014.01.07.08.23.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jan 2014 08:23:38 -0800 (PST) From: Marcus Shawcroft To: libc-ports@sourceware.org Cc: Marcus Shawcroft Subject: [PATCH] [AArch64] Fix FP_ROUNDMODE. Date: Tue, 7 Jan 2014 16:23:30 +0000 Message-Id: <1389111810-10851-1-git-send-email-marcus.shawcroft@linaro.org> X-Original-Sender: marcus.shawcroft@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::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=@sourceware.org X-Google-Group-Id: 836684582541 List-Archive: [BZ #16387] Fix FP_ROUNDMODE to extract the correct bits from FPCR. Committed. /Marcus --- NEWS | 2 +- ports/ChangeLog.aarch64 | 7 +++++++ ports/sysdeps/aarch64/fpu/fpu_control.h | 3 +++ ports/sysdeps/aarch64/soft-fp/sfp-machine.h | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a3030eb..d674772 100644 --- a/NEWS +++ b/NEWS @@ -24,7 +24,7 @@ Version 2.19 16103, 16112, 16143, 16144, 16146, 16150, 16151, 16153, 16167, 16172, 16195, 16214, 16245, 16271, 16274, 16283, 16289, 16293, 16314, 16316, 16330, 16337, 16338, 16356, 16365, 16366, 16369, 16372, 16375, 16379, - 16384, 16385, 16386, 16390, 16400. + 16384, 16385, 16386, 16387, 16390, 16400. * Slovenian translations for glibc messages have been contributed by the Translation Project's Slovenian team of translators. diff --git a/ports/ChangeLog.aarch64 b/ports/ChangeLog.aarch64 index 53ec535..3867810 100644 --- a/ports/ChangeLog.aarch64 +++ b/ports/ChangeLog.aarch64 @@ -1,5 +1,12 @@ 2014-01-07 Marcus Shawcroft + [BZ #16387] + * sysdeps/aarch64/fpu/fpu_control.h (_FPU_FPCR_RM_MASK): Define. + * sysdeps/aarch64/soft-fp/sfp-machine.h (FP_ROUNDMODE): Adjust + rounding mode mask. + +2014-01-07 Marcus Shawcroft + * sysdeps/aarch64/libm-test-ulps: Drop sqrt ULPs. 2014-01-07 Marcus Shawcroft diff --git a/ports/sysdeps/aarch64/fpu/fpu_control.h b/ports/sysdeps/aarch64/fpu/fpu_control.h index 79ab5fb..6a265e8 100644 --- a/ports/sysdeps/aarch64/fpu/fpu_control.h +++ b/ports/sysdeps/aarch64/fpu/fpu_control.h @@ -59,6 +59,9 @@ E E D D E E */ + +#define _FPU_FPCR_RM_MASK 0xc00000 + #define _FPU_FPCR_MASK_IXE 0x1000 #define _FPU_FPCR_MASK_UFE 0x0800 #define _FPU_FPCR_MASK_OFE 0x0400 diff --git a/ports/sysdeps/aarch64/soft-fp/sfp-machine.h b/ports/sysdeps/aarch64/soft-fp/sfp-machine.h index d21d00a..9bb94e5 100644 --- a/ports/sysdeps/aarch64/soft-fp/sfp-machine.h +++ b/ports/sysdeps/aarch64/soft-fp/sfp-machine.h @@ -47,7 +47,7 @@ #define _FP_DECL_EX fpu_control_t _fcw -#define FP_ROUNDMODE (_fcw & 0x3) +#define FP_ROUNDMODE (_fcw & _FPU_FPCR_RM_MASK) #define FP_RND_NEAREST FE_TONEAREST #define FP_RND_ZERO FE_TOWARDZERO