Dennis Lee Bieber wrote:
> Actually, I think the use of disassemblers et al has fallen away.
> Modern processors have so many peephole optimizations and out-of-order
> execution streams that converting an executable back to assembly source is
> almost meaningless -- and getting back to a high-level language is near
> impossible. One would have to be an expert at the assembly for a processor
> to have any chance of understanding the result.
Apple essentially do this for their Rosetta 2 x86-to-ARM converter. They
take existing x86 executables, which are likely generated by their Xcode
LLVM compiler. They convert the assembly back into LLVM's intermediate
representation, which is the idealised-assembly representation most of the
compiler stages work on. Then they push that IR through the regular ARM
LLVM backend, including optimiser stages, to produce 64-bit ARM executables.
It's not a language intended for humans to read, but it's high enough for
the compiler stages to work on. Doing it this way avoids having to emulate
any ARM instructions.
Theo
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|