Kelly Leahy wrote:
While writing an x86 emulator (and integrating it into wine) would be quite difficult, I don't see how the complexity has anything to do with the data types and API functions... A true emulator has no concept whatsoever of data types (except the very basic data types of the cpu - x-bit word, x-bit IEEE number, for instance), so its complexity cannot possibly depend on the high-level data types used by the compiler generating the machine code...
This is true when you run the whole application, i.e. the Wine parts together with the Windows binaries, under an emulator. However, to do so you don't need to integrate the emulator into Wine, but you can just run the whole Wine process under an external emulator like qemu.
The only reason for wanting to integrate an emulator into Wine is that this would allow to run the Wine components natively, and only switch to the emulator for executing Windows binaries. However, for this to work means that on every cross-call from Wine to Windows code or vice versa we need to transition into or out of the emulator; and this involves converting all arguments and return values of such calls between the Windows/x86 format and the native format of the host.
Bye, Ulrich