Pushing the limits of RISC-V emulation
shuklaayu.sh
Pushing the limits of RISC-V emulation
1–10 of 36 posts
Re: Pushing the limits of RISC-V emulation
#2Re: Pushing the limits of RISC-V emulation
#3At the end it is not emulation but static recompilation (which is, arguably, cooler)
Re: Pushing the limits of RISC-V emulation
#4At the end it is not emulation but static recompilation (which is, arguably, cooler)
How do you differentiate the two? What is the benefit of such a distinction? Why not use eg threaded emulation vs recompiled emulation?
eg:
if (rand64() == 0x123456789abcdef0ull)
baz = bar;
an emulator will likely never visit that assignment. A static recompiler will translate it.Re: Pushing the limits of RISC-V emulation
#5Earlier quoted context omitted.
How do you differentiate the two? What is the benefit of such a distinction? Why not use eg threaded emulation vs recompiled emulation?
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.
Anyway, qemu certainly seems like it would fall under your definition of "emulator" despite obviously dynamically recompiling.
Re: Pushing the limits of RISC-V emulation
#6At the end it is not emulation but static recompilation (which is, arguably, cooler)
How do you differentiate the two? What is the benefit of such a distinction? Why not use eg threaded emulation vs recompiled emulation?
Re: Pushing the limits of RISC-V emulation
#7Earlier quoted context omitted.
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.
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.
distinction is that an emulator is much simpler, while a static recompiler is a lot more work and thus ~30% more cool
Re: Pushing the limits of RISC-V emulation
#8Earlier quoted context omitted.
How do you differentiate the two? What is the benefit of such a distinction? Why not use eg threaded emulation vs recompiled emulation?
In my limited understanding, static recompiling is like JIT transpilation from one arch to another where emulation runs each instruction calling behaviour depending on the instruction. As for tradeoffs my knowledge is not wide enough to declare anything certain.
Re: Pushing the limits of RISC-V emulation
#9Earlier quoted context omitted.
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.
which is why i said "static recompiler" and not just "recompiler" distinction is that an emulator is much simpler, while a static recompiler is a lot more work and thus ~30% more cool
Re: Pushing the limits of RISC-V emulation
#10I can't find a link, but if anyone recalls or wrote such an jit interpreter, please post.