Polymorph-VM - First Steps, "microcode"...
The first steps of actual code have gone in...I still need to complete out the C wrapping the inline PowerPC Assembly and confirm the formatting of some details.
there is an "Eproc" 2nd Interface defined for the Polymorph.Library,
From the "main" Interface will be Scripting and Class management routines for handling various logical concepts in an OOP style manner.
the "Eproc" interface is going to be running from within the Interpreter/Dynamic-Recompiler threads of execution.
For these I am defining usage of some specific registers, I have to thank kas1e's blog entry "The Hacking Way" for information about how AOS4 function calls occur and enough information to understand how the PPC edition of the Library LVO calls work.
the PowerPC provides 32 registers (I use r0 through r31 to name them) with r0-r2, r13 and r31 used by the OS.
Polymorph uses registers r8-r12 for internal state values and supports the use of r14 as a MachineStateRegister inside the Emulated CPU systems, registers r15-r30 are available for plugin specific usage as whatever data registers are needed.
The "Zeropage" inside the Emulation is referred to by r10 and r9 is the IXP register.
any additional information is accessed using "Eproc" Interface functions with the Interface pointer being stored into r12 to execute.
Eproc currently provides
ReadOctet WriteOctet ReadShortBE ReadShortLE WriteShortBE WriteShortLE ReadLongBE ReadLongLE WriteLongBE WriteLongLE functions for reading and writing to memory locations.
I still have ExecOpCode8 and ExecOpCode16 calls to deal with bytecode sequence execution.
Further information is still to come along as wellSubmitted by Belxjander on Tue, 2012-05-15 05:43