Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754478AbbKMAqi (ORCPT ); Thu, 12 Nov 2015 19:46:38 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:16441 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751747AbbKMAqh (ORCPT ); Thu, 12 Nov 2015 19:46:37 -0500 Date: Fri, 13 Nov 2015 00:46:33 +0000 From: "Maciej W. Rozycki" To: Ralf Baechle CC: Andrew Morton , Matthew Fortune , , Subject: [PATCH 0/(8+2)] MIPS: IEEE Std 754-2008 features Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [10.100.200.62] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2260 Lines: 47 Hi, As many of you have been aware it has been a long practice for software using IEEE 754 floating-point arithmetic run on MIPS processors to use an encoding of Not-a-Number (NaN) data different to one used by software run on other processors. And as of IEEE 754-2008 revision [1] this encoding does not follow one recommended in the standard, as specified in section 6.2.1, where it is stated that quiet NaNs should have the first bit (d1) of their significand set to 1 while signalling NaNs should have that bit set to 0, but MIPS software interprets the two bits in the opposite manner. As from revision 3.50 [2][3] the MIPS Architecture provides for processors that support the IEEE 754-2008 preferred NaN encoding format. As the two formats (further referred to as "legacy NaN" and "2008 NaN") are incompatible to each other, the run-time environment has to provide support for the two formats to help people avoid using incompatible binary modules. Here is the Linux kernel part. These are 8 changes comprising the actual feature and a set of 2 extra patches -- a code structure clean-up for ELF personality macros, and a proposal to make sNaN bit pattern propagation more in line with the current version of the said standard even for legacy-NaN implementations. The complementing glibc dynamic loader part has been posted here: and included in FSF glibc with commit 9c21573c. References: [1] "IEEE Standard for Floating-Point Arithmetic", IEEE Computer Society, IEEE Std 754-2008, 29 August 2008 [2] "MIPS Architecture For Programmers, Volume I-A: Introduction to the MIPS32 Architecture", MIPS Technologies, Inc., Document Number: MD00082, Revision 3.50, September 20, 2012 [3] "MIPS Architecture For Programmers, Volume I-A: Introduction to the MIPS64 Architecture", MIPS Technologies, Inc., Document Number: MD00083, Revision 3.50, September 20, 2012 Maciej -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/