Sebastian Biallas
2006-03-08 20:56:55 UTC
Hello!
For some time now I'm thinking of making the CPU emulation reentrant.
The idea would be to put the gCPU structure on the stack while executing
the generated code (so all register accesses etc would be %esp relative
instead of absolute addresses) and to pass a pointer to the CPU
structure to all "normal" functions.
The question is: Is this worth the efford?
cons:
- - %esp relative accesses are one byte longer.
- - asm code might become slightly more complicated
pros:
- - ability to implement SMP
Comments?
Sebastian
For some time now I'm thinking of making the CPU emulation reentrant.
The idea would be to put the gCPU structure on the stack while executing
the generated code (so all register accesses etc would be %esp relative
instead of absolute addresses) and to pass a pointer to the CPU
structure to all "normal" functions.
The question is: Is this worth the efford?
cons:
- - %esp relative accesses are one byte longer.
- - asm code might become slightly more complicated
pros:
- - ability to implement SMP
Comments?
Sebastian