From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18075 invoked by alias); 20 Oct 2010 11:30:10 -0000 Received: (qmail 18059 invoked by uid 22791); 20 Oct 2010 11:30:09 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Oct 2010 11:30:01 +0000 Received: from sunsite.mff.cuni.cz (localhost [127.0.0.1]) by sunsite.mff.cuni.cz (8.14.4/8.14.3) with ESMTP id o9KBTwec026399; Wed, 20 Oct 2010 13:29:58 +0200 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.14.4/8.14.4/Submit) id o9KBTwbB026398; Wed, 20 Oct 2010 13:29:58 +0200 Date: Wed, 20 Oct 2010 11:30:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] bits/mathdef.h changes for s390 and ia64, ldbl-128 fmal fix Message-ID: <20101020112957.GD21391@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00009.txt.bz2 Hi! This provides FP_FAST* definitions for ia64 and s390{,x} and fixes a buglet in ldbl-128 fmal. 2010-10-20 Jakub Jelinek * sysdeps/ia64/bits/mathdef.h (FP_FAST_FMA, FP_FAST_FMAF, FP_FAST_FMAL): Define. * sysdeps/s390/bits/mathdef.h (FP_FAST_FMA, FP_FAST_FMAF): Likewise. * sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Fix up inline asm. --- libc/sysdeps/ia64/bits/mathdef.h +++ libc/sysdeps/ia64/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2004, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,4 +34,9 @@ typedef double double_t; /* `double' expressions are evaluated as # define FP_ILOGB0 (-2147483647 - 1) # define FP_ILOGBNAN 2147483647 +/* The IA-64 architecture has fused multiply/add instructions. */ +# define FP_FAST_FMA 1 +# define FP_FAST_FMAF 1 +# define FP_FAST_FMAL 1 + #endif /* ISO C99 */ --- libc/sysdeps/ieee754/ldbl-128/s_fmal.c +++ libc/sysdeps/ieee754/ldbl-128/s_fmal.c @@ -176,7 +176,7 @@ __fmal (long double x, long double y, long double z) u.ieee.mantissa3 |= fetestexcept (FE_INEXACT) != 0; v.d = a1 + u.d; /* Ensure the addition is not scheduled after fetestexcept call. */ - asm volatile ("" : "m" (v)); + asm volatile ("" : : "m" (v)); int j = fetestexcept (FE_INEXACT) != 0; feupdateenv (&env); /* Ensure the following computations are performed in default rounding --- libc/sysdeps/s390/bits/mathdef.h +++ libc/sysdeps/s390/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2004, 2006 +/* Copyright (C) 1997, 1998, 1999, 2000, 2004, 2006, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -35,4 +35,8 @@ typedef double double_t; /* `double' expressions are evaluated as # define FP_ILOGB0 (-2147483647) # define FP_ILOGBNAN 2147483647 +/* The S/390 architecture has fused multiply/add instructions. */ +# define FP_FAST_FMA 1 +# define FP_FAST_FMAF 1 + #endif /* ISO C99 */ Jakub