From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17710 invoked by alias); 31 May 2012 04:04:48 -0000 Received: (qmail 17685 invoked by uid 22791); 31 May 2012 04:04:46 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pz0-f41.google.com (HELO mail-pz0-f41.google.com) (209.85.210.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 May 2012 04:04:20 +0000 Received: by dakp5 with SMTP id p5so714129dak.0 for ; Wed, 30 May 2012 21:04:19 -0700 (PDT) Received: by 10.68.213.101 with SMTP id nr5mr2295836pbc.131.1338437059554; Wed, 30 May 2012 21:04:19 -0700 (PDT) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id rs3sm2727422pbc.47.2012.05.30.21.04.18 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 May 2012 21:04:19 -0700 (PDT) From: Richard Henderson To: libc-ports@sourceware.org Subject: [PATCH 2/2] alpha: Add -mieee-with-inexact for fma compilation Date: Thu, 31 May 2012 04:04:00 -0000 Message-Id: <1338437052-11536-2-git-send-email-rth@twiddle.net> In-Reply-To: <1338437052-11536-1-git-send-email-rth@twiddle.net> References: <1338437052-11536-1-git-send-email-rth@twiddle.net> X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00209.txt.bz2 Thanks for pointing out the forgotten fma correction, Joseph. r~ ChangeLog.alpha | 4 ++++ sysdeps/alpha/Makefile | 6 ++++++ sysdeps/alpha/fpu/libm-test-ulps | 14 -------------- 3 files changed, 10 insertions(+), 14 deletions(-) * sysdeps/alpha/Makefile (CFLAGS-s_fma.c): Set -mieee-with-inexact. (CFLAGS-s_fmaf.c): Likewise. * sysdeps/alpha/fpu/libm-test-ulps: Regenerate. diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index b08f69d..17fd3b8 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -37,6 +37,12 @@ ifeq ($(subdir),elf) CFLAGS-rtld.c = -mbuild-constants endif +ifeq ($(subdir),math) +# The fma routines rely on inexact being raised for correct results. +CFLAGS-s_fma.c = -mieee-with-inexact +CFLAGS-s_fmaf.c = -mieee-with-inexact +endif + # Build everything with full IEEE math support, and with dynamic rounding; # there are a number of math routines that are defined to work with the # "current" rounding mode, and it's easiest to set this with all of them. diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 3988426..908154c 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -1615,20 +1615,6 @@ Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217": double: 1 idouble: 1 -# fma -Test "fma (-0x1.19cab66d73e17p-959, 0x1.c7108a8c5ff51p-107, -0x0.80b0ad65d9b64p-1022) == -0x0.80b0ad65d9d59p-1022": -double: 1 -idouble: 1 -Test "fma (0x1.0000002p+0, 0x1.ffffffcp-1, -0x1p-300) == 0x1.fffffffffffffp-1": -double: 1 -idouble: 1 -Test "fma (0x1.153d650bb9f06p-907, 0x1.2d01230d48407p-125, -0x0.b278d5acfc3cp-1022) == -0x0.b22757123bbe9p-1022": -double: 1 -idouble: 1 -Test "fma (0x1.4000004p-967, 0x1p-106, 0x0.000001p-1022) == 0x0.0000010000003p-1022": -double: 1 -idouble: 1 - # gamma Test "gamma (-0.5) == log(2*sqrt(pi))": ildouble: 1 -- 1.7.7.6