3 ms·
> Static binary translation is relatively straightforward until you start doing indirect jumps (function pointers, C++ vtables, etc), then all hell breaks loose
by astrange 5y ago
> Static binary translation is relatively straightforward until you start doing indirect jumps (function pointers, C++ vtables, etc), then all hell breaks loose.
It's not even possible on x86 with only static jumps, because you can jump into the middle of an instruction and turn it into a different one.
- colejohnson66 5y agoHow does Rosetta handle it? Has anyone tested jumping into the middle of an instruction on an M1 Mac?
- astrange 5y agoIt probably falls back to JIT, just like if you started doing self-modifying code. This isn't a common case, it's more for code golf and malware.
- Scaevolus 5y agoYou handle that by creating a new basic block.