From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AM48P-0004Ma-AV for qemu-devel@nongnu.org; Tue, 18 Nov 2003 06:35:05 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AM47a-0004AW-Sb for qemu-devel@nongnu.org; Tue, 18 Nov 2003 06:34:46 -0500 Received: from [62.210.158.46] (helo=teheran.magic.fr) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AM47R-00049T-Fp for qemu-devel@nongnu.org; Tue, 18 Nov 2003 06:34:05 -0500 Received: from 10.0.0.2 (ppp-181.net-555.magic.fr [62.210.255.181]) by teheran.magic.fr (8.11.6/8.11.2) with ESMTP id hAIAWZe19005 for ; Tue, 18 Nov 2003 11:32:35 +0100 (CET) Subject: Re: [Qemu-devel] [ADD] PPC processor emulation From: "J. Mayer" In-Reply-To: References: <20031117105133.7e856e56.Jens.Arm@gmx.de> <1069140512.14646.2174.camel@rapid> Content-Type: text/plain Message-Id: <1069151842.13659.2338.camel@rapid> Mime-Version: 1.0 Date: 18 Nov 2003 11:37:22 +0100 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, 2003-11-18 at 10:37, Gwenole Beauchesne wrote: > On Tue, 18 Nov 2003, J. Mayer wrote: > > > Here's a set of patches which adds PPC processor as a new target. > > The emulation is not complete: > > Hehe, interesting. Since I hadn't seen news so far, I decided to implement > my own version for the SheepShaver core CPU emulator this weekend. ;-) > Damned :=) > I have a test program that covers around 600K variants with specific > values to trigger flags updates. It requires a PPC host for now to > validate results. It helped a lot to first write a correct interpreter and > discover some hidden semantics in rare cases. > The program, ppc_test does this with a lot of different instruction, using a huge set of values. With the ctrace program, I could check that it runs the same on my Ibook and on my PC with qemu. Where could I find yours to make more tests ? You found hidden semantics, as you say. What is confusing, also, is that Motorola's implementation isn't the same than IBM's one for some strange cases... > I will first fix Microlib's core and try to have a look at QEMU's > afterwards. > > > there is no supervisor mode support for now > > Assuming supervisor is OEA, how do you plan to emulate the TBR (at least > for VEA)? Currently, I make TBU=0/TBL=clock() loaded at MFTBR time. This > is enough to make MacOS classic happy. An alternative would be to use > gettimeofday() for seconds/microseconds. Any ideas? > My TBL/TBU implementation isn't a real time clock, but is a cycle counter, as on "real" PPC. That means that the CPU will seem to run with a variable clock, if a program compares its value to the one given by a real-time clock. It's updated at the end of a translated block, or when I see a mftbl/mftbu instruction. This way of doing seems closer to real PPC implementation, but may look strange for some OS's... Regards. J. Mayer Never organized