First post, by KPAH
Greetings everybody!
Recently i ran dosbox on my PSP. Well, i was really impressed! And now i have intention to improve x86 emulation performance at least on PSP. Hope, i have some time to spend too... Have C, C++ and x86 assembler experience (namely - use them by occupation last 8 years).
All i need is some dynamic core details. There are some ideas in my head - the question is are they worth.
1) most important: is dynamic core available/used on PSP build ?
2) As far as i understand dynamic core takes a part of emulated x86 code, and "compiles" it to function in native code (x86, ARM, MIPS etc). Dosbox simply runs native code function instead of translating emulated code, right?
3) how do you decide which part to "compile"? Is there some barriers like memory accesses, I\O operations, jumps etc?
4) do you just "compile" all suitable code parts or automatically detect hotspots and process them only? If automatically, how?
5) any self-modified code issues?
6) what kind of assembly code is generated? Load-execute-store for each x86 instruction or at least store/load optimized? I am talking about code like this:
------------------ initial x86 code
add ax, bx
add ax, cx
------------------ load-execute-store
mov r1, [RAX]
add r1, [RBX]
mov [RAX], r1
mov r1, [RAX]
add r1, [RCX]
mov [RAX], r1
------------------ load-execute-store with store/load optimization
mov r1, [RAX]
add r1, [RBX]
add r1, [RCX]
mov [RAX], r1
------------------
Other rather simple to implement optimization methods are possible. Up to eliminating writing register values temporary to memory - like virtually expanding x86 registers quantity.
At this moment i see it is rather simple to implement "compilation" to native code almost for any platform such parts of x86 code which have no: memory accesses (or they are but no paging etc), jumps, port I/O, floating point operations.
Thanks in advance