Trace: » PowerPC Emulator Testsuite

PowerPC Emulator Testsuite

The PowerPC Emulator Tester is a self-contained testsuite I wrote for the SheepShaver emulation engine. It was a very handy tool during the development of the SheepShaver PowerPC Emulator and considerably reduced debugging time when AltiVec emulation was added. I hope this would be useful to other PowerPC Emulator authors. The code is distributed under the terms of the GNU General Public License (GPL).

It's not terrific code and can largely be improved and cleaned up, but it provides reasonnable information to chase down a bug.

See links for other testsuites. As of 2006/07/04, the current SheepShaver CVS branch contains a more accurate FPU emulation engine. It passes VEX tests with more precision & exception bits. All the following glibc tests pass on PPC: test-fenv, test-arith{,f}, test-{float,double}. Almost all of them pass on x86-64 too (modulo a few errors in test-float), provided that GCC >= 4.0.1 is used. The more accurate engine is enabled with PPC_ENABLE_FPU_EXCEPTIONS.

Features

  • Self-contained. No guest OS nor any complicated run-time environment is required. Your CPU emulator simply needs to support a special opcode (0×18000000, OP=6) that terminates execution of the current basic block.
  • Supports the AltiVec ISA.
  • Generates more than 2 million tests with specific values to trigger condition codes changes, unspecified results (matches a PowerPC 7410, aka my Powerbook G4).

Downloads

  • The primary source is available in SheepShaver CVS. A copy of the PowerPC Emulator Tester source code is available here for convenience.
  • It is recommended that you first run the tester on a native PowerPC platform to generate a results file. For reference, here is the PowerPC Emulator Tester results file I use for SheepShaver. This was generated with AltiVec tests enabled. This is for revision 1.30+ of the file. md5sum is: 3e29432abb6e21e625a2eef8cf2f0840.

Links

  • Valgrind contains an interesting testsuite for the VEX.
  • Qemu-PPC contains part of the original ALU tests used in VEX.
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki