From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2rhu-0007a0-9F for qemu-devel@nongnu.org; Thu, 03 Jul 2014 20:50:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2rht-0007tU-AG for qemu-devel@nongnu.org; Thu, 03 Jul 2014 20:50:30 -0400 Received: from zeniv.linux.org.uk ([2002:c35c:fd02::1]:53459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2rht-0007tO-29 for qemu-devel@nongnu.org; Thu, 03 Jul 2014 20:50:29 -0400 Date: Fri, 4 Jul 2014 01:50:24 +0100 From: Al Viro Message-ID: <20140704005024.GT18016@ZenIV.linux.org.uk> References: <53B2E9CA.4040802@twiddle.net> <20140701175036.GJ18016@ZenIV.linux.org.uk> <53B2FE3B.6050306@twiddle.net> <20140702040508.GK18016@ZenIV.linux.org.uk> <53B41E36.30906@twiddle.net> <20140702152027.GN18016@ZenIV.linux.org.uk> <20140703065104.GP18016@ZenIV.linux.org.uk> <20140703182501.GQ18016@ZenIV.linux.org.uk> <53B5BAC7.1010603@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53B5BAC7.1010603@twiddle.net> 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 Thu, Jul 03, 2014 at 01:19:19PM -0700, Richard Henderson wrote: > I believe I have a tidy solution to these /v insns. New patch set shortly. OK, looks sane. Next (trivial) bug: in translate_one() case 0xF800: /* WH64 */ /* No-op */ break; should be followed by case 0xFC00: /* WH64EN */ /* No-op */ break; As it is, asm __volatile( "lda $0,%0\n\t" "wh64en ($0)\n\t" :: "m"(r)); ends sending SIGILL. Another one is probably not worth bothering - PERR, CTPOP, CTLZ, UNPKBx and PKxB don't accept literal argument. For one thing, as(1) won't let you generate those, so it would have to be explicit .long 0x70001620 instead of perr $0,0,$0 On DS10 it gives SIGILL; under qemu it succeeds. Trivial to fix, anyway, if we care about that (if (islit) goto invalid_opc; in 1C.030..1C.037). Another interesting bit I _really_ don't want to touch right now is LDx_L/STx_C; what we get there is closer to compare-and-swap than to what the real hardware is doing. OTOH, considering the constraints on what can go between LDx_L and STx_C, I'm not sure whether it can lead to any real problems with the current qemu behaviour... Hell knows; could a long linear piece of code with LDL_L near the point where it runs out of space in block end up with QEMU switching to different cpu before we reach the matching STL_C? If so, there might be problems; on actual hardware CPU1: LDL_L reads 0 CPU2: store 1 ... CPU2: store 0 CPU1: STL_C would have STL_C fail. qemu implementation of those suckers will succeed. I'm not sure if anything in the kernel is sensitive to that, but analysis won't be fun...