Hacker News new | past | comments | ask | show | jobs | submit login

QEMU probably had to account for differences in memory models. A fork with that stuff removed might be able to easily catch up.





QEMU loses a bit from being a generic translator instead of being specialized for x86->ARM like Rosetta 2, Box64 or FEXEmu. It does a lot of spilling for example even though x86 has a lot fewer registers than aarch64.

Flags are also tricky, though they're pretty well optimized. In the end the main issue with them is also the spilling, but QEMU's generic architecture makes it expensive to handle consecutive jump instructions for example.


I found this blog post reverse engineering Rosetta 2 translated code: https://dougallj.wordpress.com/2022/11/09/why-is-rosetta-2-f...

Interesting. Yeah, being able to use Arm flags always is probably a big thing, since they even added hardware support for that.

It's a huge achievement for a single person to have written most of that.


> It's a huge achievement for a single person to have written most of that.

Qemu was mostly Fabrice Bellard by himself at the beginning and plenty of emulators are single person project.

It’s a field which lends itself well to single person development. How to properly architecture compiler/interpreter/emulator has been studied to death and everyone mostly uses the same core principles so there is little guess work as how to start (provided you have taken the time to study the field). If you are ready to do the work, you can reach a working translator from hard work alone. Then, the interesting work of optimising it starts.

Don’t get me wrong, Rosetta 2 is a very impressive achievement because the performances are really good. I tip my metaphorical hat to whoever did it. My post is more in the spirit of you can do something in the same ballpark too if that’s your kick.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: