I had spent lot of time on understanding and reshaping the x86 JIT compiling, and fit the PPC code emitter into it. No, no and no. The source code is so deeply convoluted, riddled with residue from debugging, useless functions and scary/cryptic workarounds that I had to give it up.
So, I finally decided: I will rip the x86 part out of the recent E-UAE sources. The PPC code emitter will come as a brand new part, won't depend on the x86 counterpart.
And that is 100% right decission. Its always better to write some code from scratch, in compare with understanding, then fixing, then again understanding that code done by others (expectually assembler related) usually crap and hell from the evil :)
ReplyDeleteKeep it up, its good to know that you works hard on.
That's good. This can speed it up and the risk of making errors is reduced. Please take note that the source should be compilable on any AmigaOS like platform, or at least, be as portable as possible. Thank you.
ReplyDeleteDon't worry about compatibility, it shouldn't be an issue. There are only two system-specific calls needed: allocating executable memory and flushing the instruction cache occassionally.
ReplyDeleteOther than that the alignment of some data might be a minor issue, but everything will be properly aligned to 8 byte boundary.
Hopefully, the JIT compiling will be compatible most of the PPC systems (MOS, Mac, Linux, game consoles), only minor adjustments might be needed.