Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#29 Test suite needed

open
nobody
None
5
2004-05-30
2004-05-30
No

It would be nice to have an automated PowerPC test suite,
to track how many different asm instructions are left
to do...

Both PPC32, Altivec, and PPC64 instructions set.
I think Kheperix comes with something like this?

http://gwenole.beauchesne.free.fr/kheperix/test-powerpc.cpp

Discussion

  • Logged In: YES
    user_id=5895

    Some kind of easy benchmarks would be neat too.
    (interesting to compare versus real PowerPCs...)

     
  • John_K
    John_K
    2004-06-05

    Logged In: YES
    user_id=1050061

    Well the fact that Altivec was only recently started (ie
    last 3 days) and the fact that G3s are only 32 bit make some
    of that bit useless. Also I don't think there are many 9if
    any) unimplemented 32bit instrs currently, just things that
    need fixing.

    Benchmarks may become useful in the future, but at least not
    until timing is 100% fixed as you would not get even close
    to accurate results.

     
  • Logged In: YES
    user_id=5895

    While trying to the test the PearPC emulator with this test,
    I ran into a a couple of problems. Some have been solved,
    some need some further ideas/inputs or workarounds first...

    1)
    The first problem was that PearPC requires a lot of things
    to be set up before it will run, it even relies on a global
    configuration object being loaded and similar non-givens.
    (like having to allocate memory and init I/O and CPU). Done.

    2)
    The second problem was that it links towards most of the
    rest of the library, including all the network/graphic cards
    and everything - so I just copied the objects from "ppc".

    3)
    The third problem was that it crashes without a SystemDisplay,
    which I solved by doing a quick "NullObject" DummyDisplay class.

    4)
    The fourth, and final problem is that it can only run in its
    own memory space - not execute instructions being passed to
    it...

    The test assumes to be able to call a virtual method defined as:
    void execute(uintptr addr);

    It consists of a list of PowerPC instructions (code) to execute,
    eventually terminating by a "blr" instruction when tests are
    done
    (this method gets called over and over with all the
    different tests).
    But for PearPC, it must be copied into "memory" first to be
    run ?

    For the other emulators, the code looks something like:
    ppc_running = true;
    while (ppc_running) {
    ppc_inst_t inst = ppc_code_fetch(PC);
    ppc_execute(inst);
    }
    or
    ppc->nip = entry_point;
    cpu_exec(ppc);

    But there doesn't seem to exist any way to do this in PearPC,
    without copying and pasting huge parts of the big "ppc_run".
    And it still only wants to read from the mapped memory. :-(

    Does anyone have any ideas how to accomplish this with PearPC ?
    I could simply copy the instructions into emulated memory
    until encountering a terminating instruction, or something.
    (since it is not known with the current code what the size is)