qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] PowerPC CPU tester


From: J. Mayer
Subject: Re: [Qemu-devel] PowerPC CPU tester
Date: 03 Dec 2003 10:05:28 +0100

On Wed, 2003-12-03 at 08:10, Gwenole Beauchesne wrote:
> Hi,

Hi !

> > Would it be possible to get a readable description of the problems
> > encountered ?
> 
> Hmm, wait, I read XER the wrong way. It seems you used the normal 
> numbering way with 0 being LSB. I have uploaded a new version of 
> test-powerpc.cpp. Sorry, for the inconvience. Only "rlwimi" were wrong 
> indeed.
> 30698 errors out of 689408 tests

Well, I understand. I hate the IBM/Motorola notation....
Can you please give me a detailed report of rlwimi problem ? I think I
found it (missing parenthesis in micro-op).
You may try to replace in translate-ppc/op.c:

Index: target-ppc/op.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-ppc/op.c,v
retrieving revision 1.2
diff -u -d -w -B -b -d -p -r1.2 op.c
--- target-ppc/op.c     23 Nov 2003 16:58:08 -0000      1.2
+++ target-ppc/op.c     3 Dec 2003 08:55:51 -0000
@@ -988,7 +1143,7 @@ PPC_OP(xori)
 /* rotate left word immediate then mask insert */
 PPC_OP(rlwimi)
 {
-    T0 = rotl(T0, PARAM(1) & PARAM(2)) | (T0 & PARAM(3));
+    T0 = (rotl(T0, PARAM(1)) & PARAM(2)) | (T1 & PARAM(3));
     RETURN();
 }

In between, I read more of your code and I now understand better how is
your .dat file to be used.

> >> 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.
> 
> Indeed, copy-paste propagation. ;-) Thanks, for noticing.

Quite common problem :=)
In fact, I noticed that a G4 doesn't report an invalid opcode but I want
to check bad bits in opcodes, at least for testing...

> That's for the tester, it's simply an extra opcode to get out of 
> emulation code, if you know a better way...

All right, I will recode it the same way regular opcodes are. That can
be usefull...

-- 
J. Mayer <address@hidden>
Never organized





reply via email to

[Prev in Thread] Current Thread [Next in Thread]