From: "J. Mayer" <l_indien@magic.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu simple user mode testing (arm, ppc, sparc)
Date: Sat, 21 Feb 2004 00:14:43 +0100 [thread overview]
Message-ID: <1077318882.17685.38.camel@rapid> (raw)
In-Reply-To: <Pine.LNX.4.43.0402161339510.19250-100000@thinkpad.wg-ro-gar1.inext.cz>
On Mon, 2004-02-16 at 13:58, Karel Gardas wrote:
> Hello,
>
> I have performed simple testing of qemu-0.5.2 (vide also my last email
> about ARM emulation issues). I have used these tests:
>
> 1) C++ hello world example using iostreams
> 2) C++ hello world example using C stdio
> 3) C hello world example using C stdio
> 4) bogomips test
>
...
> qemu-ppc:
>
> 1) stat: failed
> dyn: failed (qemu segfaults)
> 2) stats: run
> dyn: failed (qemu segfaults)
> 3) stat: run
> dyn: run
> 4) run (40 BogoMIPS)
I don't know if this fixes all issues, but I just found some bugs,
trying kernel-mode emulation, which will also affect user-mode:
1/ lwarx does all right, but doesn't keep the loaded value:
Index: target-ppc/op_mem.h
===================================================================
RCS file: /cvsroot/qemu/qemu/target-ppc/op_mem.h,v
retrieving revision 1.3
diff -u -d -w -B -b -d -p -r1.3 op_mem.h
--- target-ppc/op_mem.h 18 Jan 2004 22:49:57 -0000 1.3
+++ target-ppc/op_mem.h 20 Feb 2004 23:07:16 -0000
@@ -141,8 +141,8 @@ PPC_OP(glue(lwarx, MEMSUFFIX))
do_queue_exception(EXCP_ALIGN);
do_process_exceptions();
} else {
- glue(ldl, MEMSUFFIX)((void *)T0);
- regs->reserve = T0 & ~0x03;
+ T1 = glue(ldl, MEMSUFFIX)((void *)T0);
+ regs->reserve = T0;
}
RETURN();
}
2/ Always have to update nip when processing exceptions:
Index: op.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-ppc/op.c,v
retrieving revision 1.5
diff -u -d -w -B -b -d -p -r1.5 op.c
--- op.c 18 Jan 2004 22:49:57 -0000 1.5
+++ op.c 20 Feb 2004 23:10:40 -0000
@@ -220,8 +220,8 @@ PPC_OP(queue_exception)
PPC_OP(process_exceptions)
{
- if (env->exceptions != 0) {
env->nip = PARAM(1);
+ if (env->exceptions != 0) {
do_check_exception_state();
}
}
3/ Fix check for lswi:
Index: translate.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-ppc/translate.c,v
retrieving revision 1.6
diff -u -d -w -B -b -d -p -r1.6 translate.c
--- translate.c 3 Feb 2004 23:39:42 -0000 1.6
+++ translate.c 20 Feb 2004 23:12:40 -0000
@@ -1229,8 +1225,9 @@ GEN_HANDLER(lswi, 0x1F, 0x15, 0x12, 0x00
if (nb == 0)
nb = 32;
nr = nb / 4;
- if (((start + nr) > 32 && start <= ra && (start + nr - 32) >= ra)
||
- ((start + nr) <= 32 && start <= ra && (start + nr) >= ra)) {
+ if (((start + nr) > 32 && start <= ra && (start + nr - 32) > ra)
||
+ ((start + nr) <= 32 && start <= ra && (start + nr) > ra)) {
+ printf("Invalid lswi: start=%d nr=%d ra=%d\n", start, nr, ra);
RET_EXCP(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_LSWX);
}
if (ra == 0) {
Hope this helps...
--
J. Mayer <l_indien@magic.fr>
Never organized
next prev parent reply other threads:[~2004-02-20 23:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-16 12:58 [Qemu-devel] qemu simple user mode testing (arm, ppc, sparc) Karel Gardas
2004-02-16 13:29 ` Fabrice Bellard
2004-02-16 13:56 ` Karel Gardas
2004-02-16 13:58 ` Karel Gardas
2004-02-16 14:08 ` Karel Gardas
2004-02-16 20:01 ` Fabrice Bellard
2004-02-16 20:36 ` Fabrice Bellard
2004-02-16 20:56 ` Karel Gardas
2004-02-16 22:21 ` Fabrice Bellard
2004-02-16 23:12 ` Karel Gardas
2004-02-21 14:19 ` Fabrice Bellard
2004-02-20 23:14 ` J. Mayer [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-17 14:20 Yelich, Scott D.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1077318882.17685.38.camel@rapid \
--to=l_indien@magic.fr \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.