From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IaTZN-00009f-Iu for qemu-devel@nongnu.org; Wed, 26 Sep 2007 05:52:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IaTZN-00009Q-0L for qemu-devel@nongnu.org; Wed, 26 Sep 2007 05:52:37 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IaTZM-00015D-Er for qemu-devel@nongnu.org; Wed, 26 Sep 2007 05:52:36 -0400 Received: from [172.17.17.9] (gw.netgem.com [195.68.2.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTP id 59E8D3316E for ; Wed, 26 Sep 2007 11:52:34 +0200 (CEST) Message-ID: <46FA2BE1.3070307@bellard.org> Date: Wed, 26 Sep 2007 11:52:33 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH][MIPS] Fix [ls][wd][lr] instructions References: <20070926092330.GA29659@hall.aurel32.net> In-Reply-To: <20070926092330.GA29659@hall.aurel32.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Aurelien Jarno wrote: > Hi, > > As written in the MIPS TODO file, the lwl, lwr, ldl, ldr, swl, swr, > sdl and sdr instructions are not correctly implemented. In case of > exception the BadVAddr register gets the aligned address instead of the > unaligned original address. > > In addition to that, the store instructions are generating the wrong > exception, AdEl instead of AdEs, because the current implementation > first do a load. > > The patch below fixes that by accessing the bytes one by one, starting > by the unaligned original address. > [...] It would be a lot more efficient to add specific code in the MIPS exception handling. Fabrice.