Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hs50P-0006Ub-2g for qemu-devel@nongnu.org; Sat, 26 May 2007 18:45:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hs50N-0006QV-0k for qemu-devel@nongnu.org; Sat, 26 May 2007 18:45:00 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hs50M-0006QR-O7 for qemu-devel@nongnu.org; Sat, 26 May 2007 18:44:58 -0400 Received: from ns.suse.de ([195.135.220.2] helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hs50M-0004qe-5N for qemu-devel@nongnu.org; Sat, 26 May 2007 18:44:58 -0400 From: Andreas Schwab Subject: Re: [Qemu-devel] [M68K] Full extension word format addressing mode References: <200705262216.45853.paul@codesourcery.com> Date: Sun, 27 May 2007 00:44:55 +0200 In-Reply-To: <200705262216.45853.paul@codesourcery.com> (Paul Brook's message of "Sat\, 26 May 2007 22\:16\:44 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org Paul Brook writes: > On Saturday 26 May 2007, Andreas Schwab wrote: >> This patch implements the full extension word format addressing mode i= n >> the m68k emulation. I have manually verified that it gets all cases >> right. > >> + if ((ext & 0x80) =3D=3D 0) { >> + /* base not suppressed */ >> + if (base =3D=3D -1) >> + tmp =3D gen_im32(offset + bd); >> + else if (bd !=3D 0) { >> + tmp =3D gen_new_qreg(QMODE_I32); >> + gen_op_add32(tmp, base, gen_im32(bd)); >> + } else >> + tmp =3D base; >> + if ((ext & 0x44) =3D=3D 0) >> + gen_op_add32(tmp, tmp, add); > > This corrupts a2 in the following instruction: > > move.l ([%a2,%a1.l],0),%a0 > > I've fixed that and tweaked how temporary variables are used. Thanks. Here's a patch for a small typo: Index: translate.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/qemu/qemu/target-m68k/translate.c,v retrieving revision 1.9 diff -u -a -p -u -p -a -r1.9 translate.c --- translate.c 26 May 2007 22:11:13 -0000 1.9 +++ translate.c 26 May 2007 22:42:35 -0000 @@ -313,7 +313,7 @@ static int gen_lea_indexed(DisasContext=20 od =3D 0; } if (od !=3D 0) { - gen_op_add32(add, tmp, gen_im32(od)); + gen_op_add32(tmp, add, gen_im32(od)); add =3D tmp; } } Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different."