From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K8jBK-0006Mi-PK for qemu-devel@nongnu.org; Tue, 17 Jun 2008 17:57:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K8jBI-0006Kw-Lr for qemu-devel@nongnu.org; Tue, 17 Jun 2008 17:57:37 -0400 Received: from [199.232.76.173] (port=35946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K8jBI-0006Kj-HJ for qemu-devel@nongnu.org; Tue, 17 Jun 2008 17:57:36 -0400 Received: from relay2-v.mail.gandi.net ([217.70.178.76]:38038) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K8jBH-0005bf-Jt for qemu-devel@nongnu.org; Tue, 17 Jun 2008 17:57:36 -0400 Received: from localhost (mfilter2-v.gandi.net [217.70.178.36]) by relay2-v.mail.gandi.net (Postfix) with ESMTP id 52233135BD for ; Tue, 17 Jun 2008 23:57:34 +0200 (CEST) Received: from relay2-v.mail.gandi.net ([217.70.178.76]) by localhost (mfilter2-v.gandi.net [217.70.178.36]) (amavisd-new, port 10024) with ESMTP id FA24bL7afES6 for ; Tue, 17 Jun 2008 23:57:28 +0200 (CEST) Received: from [84.99.204.251] (251.204.99-84.rev.gaoland.net [84.99.204.251]) by relay2-v.mail.gandi.net (Postfix) with ESMTP id E9170135D0 for ; Tue, 17 Jun 2008 23:57:27 +0200 (CEST) Message-ID: <48583306.8090600@bellard.org> Date: Tue, 17 Jun 2008 23:56:22 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] Wanted: A better way to implement MIPS unaligned instructions References: <20080617121251.GB23435@networkno.de> In-Reply-To: <20080617121251.GB23435@networkno.de> Content-Type: text/plain; charset=ISO-8859-1 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 Thiemo Seufer wrote: > Hello All, > > I am currently trying to implement TCG versions of the MIPS [ls][dw][lr] > set of instructions. I believe I can't use a helper function for > load/store type instructions. The appended patch uses TCG directly, but > the resulting translation is excessively complicated. Is there a better > way to do this? A simpler solution is to use the same code as before in an helper. Helpers are perfectly usable in this case provided the cpu state is saved before calling them. When the helper solution will work, it will be possible to optimize it by directly accessing the QEMU TLB cache to do word accesses and to generate the correct exception. Fabrice.