From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2DR9-0002LJ-Ci for qemu-devel@nongnu.org; Wed, 02 Jul 2014 01:50:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2DR8-0005Cr-6G for qemu-devel@nongnu.org; Wed, 02 Jul 2014 01:50:31 -0400 Received: from zeniv.linux.org.uk ([2002:c35c:fd02::1]:43487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2DR7-0005BX-OI for qemu-devel@nongnu.org; Wed, 02 Jul 2014 01:50:30 -0400 Date: Wed, 2 Jul 2014 06:50:27 +0100 From: Al Viro Message-ID: <20140702055027.GL18016@ZenIV.linux.org.uk> References: <53A9EE7E.4020802@twiddle.net> <20140625070117.GD18016@ZenIV.linux.org.uk> <20140626055541.GF18016@ZenIV.linux.org.uk> <53B1AEEF.8010108@twiddle.net> <20140630205635.GG18016@ZenIV.linux.org.uk> <53B2E9CA.4040802@twiddle.net> <20140701175036.GJ18016@ZenIV.linux.org.uk> <53B2FE3B.6050306@twiddle.net> <20140702040508.GK18016@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140702040508.GK18016@ZenIV.linux.org.uk> Sender: Al Viro Subject: Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Peter Maydell , QEMU Developers On Wed, Jul 02, 2014 at 05:05:08AM +0100, Al Viro wrote: > OK, DS10 resurrected and so far seems to be stable (I'll know by tomorrow; > there's a possibility that chipset heatsink is dodgy, but so far it seems > to be doing OK). That gives us a EV6 box. > > Which glibc version it is? I don't see such failures with your > axp/axp-next (head at 6b38f4e7f); could you post the details on your > reproducer? I've tried to guess the likely version by glibc.git, but > I don't see nearbyint tests with such argument in any version there, > so I couldn't find it that way... FWIW, ; cat >a.c <<'EOF' #include #include volatile long x; void __attribute__((noinline)) f(double v) { x = v; } main() { unsigned long tmp, ret; static char *names[] = {"IOV", "INE", "UNF", "OVF", "DZE", "INV"}; int i; feclearexcept(FE_ALL_EXCEPT); f(4.5); __asm__ __volatile__ ( "stt $f0,%0\n\t" "trapb\n\t" "mf_fpcr $f0\n\t" "trapb\n\t" "stt $f0,%1\n\t" "ldt $f0,%0" : "=m"(tmp), "=m"(ret)); for (i = 0; i < 6; i++) printf(" %s", (ret >> (57-i)) & 1 ? names[i] : " "); printf(" %x ", fetestexcept(FE_ALL_EXCEPT)); printf("FE_INEXACT = %x\n", FE_INEXACT); } EOF ; gcc -lm a.c ; ./a.out INE 200000 FE_INEXACT = 200000 ; uname -a Linux wynton 2.6.22-rc7 #1 Thu Aug 30 02:03:17 EDT 2007 alpha GNU/Linux That's on freshly resurrected DS10, just brought to the last debian/alpha (i.e. lenny). Kernel had been locally built back before the box has died. On miles (3.3.6+, AS200) result is different: INE 0 FE_INEXACT = 200000 On qemu (with debian kernel from lenny - 2.6.26) it's the same as on DS10: INE 200000 FE_INEXACT = 200000 It _might_ be the difference between 3.3 and 2.6.20-somethine, but I doubt that. It's definitely not a matter of difference in libc versions - AS200 box has 2.13-38, but static binary built on DS10 (with its 2.7-18) copied on AS200 behaves there as locally built one (i.e. 0 from fetestexcept(), as opposed to FE_INEXACT the same static binary produces on DS10 and under qemu). AFAICS, it leaves two possibilities - EV45 (AS200) vs. EV6 (DS10) and EV67 (qemu) _or_ some change in the kernel. I'll build 3.x kernel for DS10 and post the results; shouldn't take long...