qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "J. Mayer" <l_indien@magic.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] PowerPC CPU tester
Date: 02 Dec 2003 23:44:05 +0100	[thread overview]
Message-ID: <1070405045.13658.24591.camel@rapid> (raw)
In-Reply-To: <Pine.LNX.4.50.0312021600270.14437-100000@thalys.mandrakesoft.com>

On Tue, 2003-12-02 at 16:13, Gwenole Beauchesne wrote:
> Hi,
> 
> I have finally glued QEMU to my test engine. Extra patches to QEMU core
> are appended below.
> 
> You can find the files here:
> <http://gwenole.beauchesne.free.fr/kheperix/>
> * test-powerpc.cpp
> * kheperix-0.2-ppc-results.dat.bz2: results file for non PPC platforms
> 
> The tester is old but covers around 690K variations (1.3M nowadays):
> 154656 errors out of 689408 tests
> 
> Most of them are due to miscalculation of the overflow flag. "neg" is 
> probably mis-decoded thus not handling CR or XER updates. Should be pretty 
> simple to fix.
>
Hi, 

Thanks for testing.
I'm surprised that you have problems with standard arithmetics and
logical tests, as I did test a lot of cases with my ppc-test programs
which gives the same result on a real PPC (G3 & G4) and under qemu.
Would it be possible to get a readable description of the problems
encountered ?
I can do nothing of you .dat file.
I also pass the U-boot cpu post test, 
with some fixes for string load/store and
rlwmi instructions.

I did ran your test, and the translation stops for "neg" instruction
because you generate invalid forms of this instruction:

> Testing neg
> invalid bits: 00002800 for opcode: 1f -08 - 03 (0x7c6428d0) (0x80031890)
According to PPC specification, bits 16 to 20 (in IBM/Motorola notation) have
always to be zero, has neg have no rB operand.
This can be fixed easily in your program, replacing rB with zero for neg variants
tests.
With that fix, I get this result (with the version I work on, not the commited one):
0 errors out of 663056 tests
I did fix only string/multiple load & store and rlwimi instruction...

> Index: target-ppc/translate.c
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/target-ppc/translate.c,v
> retrieving revision 1.2
> diff -u -r1.2 translate.c
> --- target-ppc/translate.c	23 Nov 2003 16:58:08 -0000	1.2
> +++ target-ppc/translate.c	2 Dec 2003 14:50:20 -0000
> @@ -22,6 +22,7 @@
>  #include "exec.h"
>  #include "disas.h"
>  
> +#define DO_EXEC_RETURN
>  //#define DO_SINGLE_STEP
>  //#define DO_STEP_FLUSH
>  
> @@ -2336,6 +2337,12 @@
>                  handler = table[opc3(ctx.opcode)];
>              }
>          }
> +#ifdef DO_EXEC_RETURN
> +		if (ctx.opcode == 0x18000000) {
> +		  gen_op_raise_exception(EXCP_HLT);
> +		  break;
> +		}
> +#endif
>          /* Is opcode *REALLY* valid ? */
>          if ((ctx.opcode & handler->inval) != 0) {
>              if (loglevel > 0) {
> 
What does this mean ?
I cannot see this opcode either in the 32 bits PPC spec, or in the PPC
750 one... Did I miss
something ?

Regards.

-- 
J. Mayer <l_indien@magic.fr>
Never organized

  reply	other threads:[~2003-12-03  0:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-02 15:13 [Qemu-devel] PowerPC CPU tester Gwenole Beauchesne
2003-12-02 22:44 ` J. Mayer [this message]
2003-12-03  7:10   ` Gwenole Beauchesne
2003-12-03  9:05     ` J. Mayer

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=1070405045.13658.24591.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).