From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBtms-0004rF-9c for qemu-devel@nongnu.org; Mon, 28 Jul 2014 18:52:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBtmr-00009t-3c for qemu-devel@nongnu.org; Mon, 28 Jul 2014 18:52:58 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:101::1]:37973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBtmq-00009l-TO for qemu-devel@nongnu.org; Mon, 28 Jul 2014 18:52:57 -0400 Date: Tue, 29 Jul 2014 00:52:54 +0200 From: Aurelien Jarno Message-ID: <20140728225254.GA1268@hall.aurel32.net> References: <1406563102-11035-1-git-send-email-elta.era@gmail.com> <1406563102-11035-2-git-send-email-elta.era@gmail.com> <20140728214242.GA24813@ohm.rr44.fr> <20140728223236.GC18733@ohm.rr44.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Sender: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 2/2] target-mips/translate.c: Add judgement for msb and lsb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Dongxue Zhang , QEMU Developers On Mon, Jul 28, 2014 at 11:34:30PM +0100, Peter Maydell wrote: > On 28 July 2014 23:32, Aurelien Jarno wrote: > > On Mon, Jul 28, 2014 at 11:01:02PM +0100, Peter Maydell wrote: > >> This may be true, but the TCG README doesn't define negative > >> lengths as being "unspecified behaviour" (ie guaranteed to at > >> least not crash even if the result isn't specified), and in fact the > >> implementation of tcg_gen_deposit will assert on negative lengths. > >> We shouldn't implement guest unpredictable cases as "crash QEMU". > > > > Well I tried this code under QEMU, and it clearly doesn't crash. It > > seems the assert are not enabled with the default configuration options. > > Try --enable-debug... That's my point, it's only in debug mode, not in the default configuration. > > That said I agree it's something to avoid, but I don't think triggering > > a RI exception is the thing to do (even if it is correct according the > > MIPS ISA manual) when real silicon output a random result instead. > > Yes, you could emit code to do that instead if you like. When I said random, it didn't say in the sense of random generator, but in the sense a result that might depend on the input value and the silicon implementation. It would be silly to emit code just for that, but it would be smart for example to skip the deposit op in that case instead of triggering an exception. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net