24 ms·
I have been thinking about this for a while now - on the one had, as somebody who has never tried anything like this and has no intention of ever doing so, it s
by krylon 8y ago
I have been thinking about this for a while now - on the one had, as somebody who has never tried anything like this and has no intention of ever doing so, it sounds like a really good idea. On the other hand, if it was such a good idea, why aren't people doing that already instead of paying the performance penalty for emulation over and over?
- imtringued 8y agoThere are a few billion reasons why it doesn't work. Indirect calls and jumps are usually the most common one because they can only be resolved while the program is running. Then there is self modifying code, most commonly because the executable was packed with UPX or equivalent. Then there is the fact that contrary to popular opinion emulators aren't forbidden from using JIT compilers which cache commonly executed code. The JIT may take some time to run but it's a negligible portion of total CPU time. Then there is the problem that the userbase for running emulated software just doesn't exist or is incredibly small. People and businesses are completely fine with running x86 only software on x86 hardware. The effort spent on building a super advanced emulator should instead be spent on making the new platform easier to develop for and ensuring more software is supported natively.
- krylon 8y agoThank you for the explanation!
- rhn_mk1 8y ago> Indirect calls and jumps are usually the most common one because they can only be resolved while the program is running. and > emulators aren't forbidden from using JIT compilers work together also in reverse: decompilers are not forbidden from running the code being analyzed, and a re-compiler could use a JIT in order to work around some more dynamic issues.