logoalt Hacker News

dmitrygrtoday at 12:58 AM2 repliesview on HN

Emulation visits instructions as they are executed. Static recompilation will (at translation time) visit instructions that can be discovered, even if they never run.

eg:

   if (rand64() == 0x123456789abcdef0ull)
      baz = bar;
an emulator will likely never visit that assignment. A static recompiler will translate it.

Replies

monocasatoday at 4:36 AM

IDK, a lot of the emulators I've seen and a couple I've written will visit that. Not everything is built on simple traces, but a lot of the time will translate more complex graphs at a time.

throwaway27448today at 1:01 AM

Hm. What is the utility of this distinction?

Anyway, qemu certainly seems like it would fall under your definition of "emulator" despite obviously dynamically recompiling.

show 1 reply