Paul Brook <[EMAIL PROTECTED]> writes: > On Saturday 26 May 2007, Andreas Schwab wrote: >> This patch implements the full extension word format addressing mode in >> the m68k emulation. I have manually verified that it gets all cases >> right. > >> + if ((ext & 0x80) == 0) { >> + /* base not suppressed */ >> + if (base == -1) >> + tmp = gen_im32(offset + bd); >> + else if (bd != 0) { >> + tmp = gen_new_qreg(QMODE_I32); >> + gen_op_add32(tmp, base, gen_im32(bd)); >> + } else >> + tmp = base; >> + if ((ext & 0x44) == 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 =================================================================== 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 od = 0; } if (od != 0) { - gen_op_add32(add, tmp, gen_im32(od)); + gen_op_add32(tmp, add, gen_im32(od)); add = tmp; } } Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."