From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19317 invoked by alias); 23 Aug 2013 15:26:55 -0000 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 Received: (qmail 19290 invoked by uid 89); 23 Aug 2013 15:26:55 -0000 X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 23 Aug 2013 15:26:54 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VCtGH-0004EM-2v from joseph_myers@mentor.com ; Fri, 23 Aug 2013 08:26:53 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 23 Aug 2013 08:26:52 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Fri, 23 Aug 2013 16:26:50 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1VCtGD-0006Zk-9J; Fri, 23 Aug 2013 15:26:49 +0000 Date: Fri, 23 Aug 2013 15:26:00 -0000 From: "Joseph S. Myers" To: "Maciej W. Rozycki" CC: , , Doug Gilmore Subject: Re: [RFC][PATCH] MIPS: IEEE 754-2008 NaN encoding support In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2013-08/txt/msg00041.txt.bz2 On Fri, 23 Aug 2013, Maciej W. Rozycki wrote: > Finally a new name has been defined for the dynamic linker so that > 2008-NaN and legacy-NaN binaries can coexist on a single system that > supports dual-mode operation and that a legacy dynamic linker that > does not support verifying the 2008-NaN ELF file header flag is not > chosen to interpret a 2008-NaN binary by accident. Adding a new name is the correct thing to do, but it means you need to update ports/sysdeps/unix/sysv/linux/mips/{configure.in,Makefile} to reflect that there are now twelve rather than six ABI variants that one or more generated installed header needs to reflect - as in ../arm/Makefile, you will need to set the *-ld-soname variables for each of the twelve ABIs, so that gnu/lib-names.h is correct for all the variants. (gnu/lib-names.h will only depend on the NaN encoding in fact, bits/syscall.h only on whether the ABI is o32, n32 or n64, and gnu/stubs.h on both whether the ABI is o32, n32 or n64 and whether it's hard or soft float. But the build system doesn't do anything special regarding headers depending only on a subset of ABI information like that; the twelve ABIs will just be treated as completely distinct for that purpose.) > Index: glibc-fsf-trunk-quilt/ports/sysdeps/mips/fpu/fesetenv.c > =================================================================== > --- glibc-fsf-trunk-quilt.orig/ports/sysdeps/mips/fpu/fesetenv.c 2013-05-16 18:17:13.000000000 +0100 > +++ glibc-fsf-trunk-quilt/ports/sysdeps/mips/fpu/fesetenv.c 2013-08-22 10:32:05.447640501 +0100 I don't see why you need changes here. If someone has somehow created an fenv_t value with an inappropriate NAN2008 bit, that's definitely outside the scope of what gives defined behavior - such values should only come from other functions such as fegetenv (or the standard values defined in fenv.h). > /* The fdlibm code requires strict IEEE double precision arithmetic, > and no interrupts for exceptions, rounding to nearest. */ > - > +#ifdef __mips_nan2008 > +#define _FPU_DEFAULT 0x00040000 > +#else > #define _FPU_DEFAULT 0x00000000 > +#endif > > -/* IEEE: same as above, but exceptions */ > +/* IEEE: same as above, but exceptions. */ > +#ifdef __mips_nan2008 > +#define _FPU_IEEE 0x00040F80 > +#else > #define _FPU_IEEE 0x00000F80 > +#endif "# define" indentation inside #if. -- Joseph S. Myers joseph@codesourcery.com