This project is dedicated to the memory of William Morris (aka Frags), who was the main contributor to the bounty but was unable to see the final result.

Wednesday, January 1, 2014

PPCJITBETA01 (Happy New Year 2014)

First of all:


I wish all of you guys an awesome happy new year for 2014!

We made it this far, there was no nuclear holocaust yet, which is an amazing achievement for the human race considering our lovely nature. Well done.

And now something completely different, but almost equally exciting (probably for much less human beings, can't speak for aliens)...

I woke up in the morning and had a look at the clock and it showed me:


BETA TIME!

Yes, it is unbelievable, I know. After this long-long waiting finally here it comes.
And it even comes with bugs! Lots of it!

Now seriously, if you are interested in testing the PowerPC JIT then go and get your binary release from the SourceForge page:


Tiny catch: at the moment only the AmigaOS4 version is available. See below.

You might also need a previous distribution which includes all the tools, like transrom, mousehack, make-hdf, etc. I tried to compile these, but somehow the cross-compiling failed and I ran out of patience.

What is included in beta01?

Before you fire up your favorite Amiga software in the emulator, please DO READ the README file! It will save you (and me) lots of wasted time, I guarantee.

The very first thing I have to mention is that although I had done my best I was not able to finish implementing all the planned instructions. We are very close, according to the statistics 95.09% of the instructions (368 out of 387) are done.
The reason is quite simple: the recently implemented instructions were the most complex ones. Well, you know this is exactly why you must not procrastinate the hardest part of the job just because it makes you nervous even simply thinking about it...
I have spent days on implementing BFINS and the exception handling for division by zero and I am still not convinced that it worth the effort. Anyway...
The following instructions are still emulated by the interpretive:
  • long versions of the division and multiplication instructions (DIVU.L/DIVS.L, MULU.L/MULS.L);
  • compare against bounds instructions (CMP2);
  • all the decimal data handling instructions (ABCD, SBCD, NBCD, PACK, UNPK).
The comparison and the decimal data handling is not that important, but the long division-multiplication are used quite often.
So that is sill a sore point, yet I have decided that I will release the beta without these instructions to get some feedback.
The missing instructions will be implemented soon, probably in the next beta release.

 

What is new in the sources?

 

Fixes and more

Since my last update I have managed to complete some more instructions and lots of bug fixes (thanks to Philippe Ferrucci and Davide Palombo, who insisted to demonstrate the JIT compiling at Alchimie and Pianeta Amiga shows, so I had to fix the most obvious bugs).
I don't want to bore you with the details regarding the current changes, have a look at this update if you are interested.

 

Source alignment

Another important change was: I have merged the final sources for E-UAE 0.8.29 over my changes.
Many thanks to Michael Trebilcock (MickJT) for driving my attention to the fact that I was using an outdated source version (0.8.29-WIP4) instead of the latest from the CVS (dated to 20/08/2008).
For the changes please have a look at these two updates: original source, fix for audio.

 

The LED (round#2)

Philippe Ferrucci pointed out that sometimes it is hard to tell whether the JIT is available and working or not, in spite of the already available JIT LED.
He suggested that the LED might also indicate other states of the JIT compiling, and I had found that a really useful idea.
Now, you can identify three distinct states of the JIT compiling from the LED colors:
1. Blinking green with "JIT" text on it: JIT compiling is active and the compiled code is executed.
The level of green shows you how active is the JIT compiled code compared to the interpretive-executed. (Same as before.)

2. Solid red with "JIT" text on it: the JIT compiling was set up, but the processor cache is turned off by the currently running software in the emulator, JIT compiling is not done while the cache is not turned on.

3. Solid black without "JIT" text on it: due to the emulator configuration the JIT compiling is not available.
Either no code cache was set up or specified processor type does not support the processor cache.



Some help needed

Unfortunately, I have no idea how to compile the sources for other platforms than AmigaOS4. If you feel like you know enough about how to compile these sources please get in touch with me. I am looking for MorphOS, MacOSX PPC, Linux PPC versions especially, but any other supported platforms are welcome. (Thunder? Tobias? Mike? :)

If you feel like there is a bug and you want to report it badly then please DO READ the How to report a bug section from the README before you jump on your mail client. Thanks.

Final words

It is a good start for a year, isn't it? I hope I can keep up and finally you can enjoy the benefits of the JIT compiling on your PowerPC machine.

12 comments:

  1. Youŕe a legend, almos ! enjoy the bounty cash mate!

    ReplyDelete
    Replies
    1. Thanks, but it is far from finished yet. :)

      Delete
  2. Replies
    1. No problem. Happy New Year to you too!

      Delete
  3. MorphOS Does not compile. And after fixing this, UAE stops after writing "Build Date..".
    I tried with SDL as well and here I get uae_sem_xxx not defined errors.

    There are two major issues when compiling:
    1. MorphOS doesn't like some soft links for directories, especially the machdep and some others. Copying to normal folders will solve this
    2. in gui-muirexx/ami-rexx.c there is a function called INSERT. But INSERT is a macro, and fails to compile. I changed this function to UAE_INSERT (at two locations within that file) and this will work to compile.

    I will look forward to fix the problems on MorphOS, but it seems to be a problem which can be solved, when I find the time. I think within this week we will have a MorphOS version.

    ReplyDelete
  4. Okay I solved it and could compile a MorphOS version. The problem was again the trackdisk.device (Pseudodevice). I am working for a trackdisk.device for PegasosII computer, and this version is completely incompatible with E-UAE so I disabled this code in the MorphOS version (pseudodevice open and pseudodevice closed contents with "#if 0" disabled)
    Without JIT, the emulator works fine. When I enable JIT, the games will lead into a Guru inside the emulator or a missed cache hit. I tried it with different cache sizes.
    Apidya, Lotus2 and Gods were tested. Apidyia either Guru or stays in black screen before the Apidya Logo appears. Lotus2 crashs right at booting, and Gods crashes after the Intro (where the music sounds weird, but this can be because of my cat who "styled" the wires of my speakers....) But it seems the JIT is used in the Gods intro, as I can see in the green blinking JIT sign.

    But it's much more stable now, I didn't encounter any crashes inside MorphOS, only inside UAE.

    ReplyDelete
    Replies
    1. Thanks. Do you mind sending the binary to me? I would upload it to the SourceForge project pages.
      Please use this version tag for compiling (for configure):

      --with-version-tag=PPCJITBETA01

      My email address is at the end of the README.

      Thanks in advance!

      Delete
    2. Of course, I just sent the binary.

      Delete
  5. @Almos
    On what mail better to send reports ? (just checked readmes, etc, and didn't find your mail)

    ReplyDelete
    Replies
    1. It is at the very end of the readme file. Or you can send me a message using the form to the right and I will reply.

      Delete