[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [M68K] Full extension word format addressing mode
From: |
Andreas Schwab |
Subject: |
Re: [Qemu-devel] [M68K] Full extension word format addressing mode |
Date: |
Sun, 27 May 2007 00:44:55 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.97 (gnu/linux) |
Paul Brook <address@hidden> 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, address@hidden
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."