|
Also stuff like https://en.wikipedia.org/wiki/Mac_68k_emulator https://en.wikipedia.org/wiki/Rosetta_%28software%29 Transitive was a company that did a lot of work in this area back in the day.
|
# ¿ Aug 6, 2015 16:44 |
|
|
# ¿ May 15, 2024 10:09 |
|
OneEightHundred posted:A lot of emulators essentially do this on the fly, but it's borderline impossible to get something that works in 100% of situations, and doing it on a compiled program might need a lot of metadata to be possible at all. The biggest problem is that instructions are variable-sized, a given sequence of bytes could represent multiple valid instruction sequences depending on where in the sequence you start execution, and jumps are to arbitrary locations in memory. Together, these create a ton of problems for figuring out what to do in cases like jump tables where the program might be expected to compute a jump offset from the current instruction pointer. Only on x86! Barring stuff like Thumb, most RISC architectures use 32-bit-wide instructions that are 4-byte aligned.
|
# ¿ Aug 6, 2015 16:46 |