When an x86 emulator team fixed bad code during emulation instead of emulating bugs
By
Raymond Chen
3h ago· 2 min readenInsight
65/100
Toasty
Bagelometer↗
Warm and crisp on the edges. A bagel with a bit of bite.
Score65TypeanalysisSentimentneutral
Summary
A software engineer recounts a war story from the early days of Windows, when an x86-32 processor emulator used binary translation to improve performance. The emulator team encountered such poorly written code that they fixed it on-the-fly during emulation rather than simply emulating the buggy behavior. The article highlights the absurdity and creativity involved in low-level software engineering.
Key quotes
· 3 pulledThis particular emulator employed binary translation, generating native code to perform the equivalent operations of the original x86-32 code.
You can imagine that x86-32 is just a bytecode,
During an exchange of war stories, a colleague of mine told one from back in the days when Windows included a processor emulator for x86-32 on systems that natively ran some other processor.
Offensive content in the eyes of a software engineer.

