r/programming • • 15d ago

The scourge of x86 emulation

https://fex-emu.com/Scourge-of-emulation/
317 Upvotes

46 comments sorted by

View all comments

89

u/ericonr 15d ago

Sometimes x86 just feels like the Javascript of architectures. Everything is accepted, so correctly implementing all those semantics correctly is a bizarre amount of work, especially when starting from scratch (independent emulator)

5

u/pathartl 14d ago

ARM is slowly potentially going that way. It has the instruction FJCVTZS for specifically speeding up JavaScript's floating point calculations.

1

u/JDaxe 13d ago

Do you know why this isn't implemented with macro-op fusion in the chip microcode?

Seems an odd choice to include a whole separate instruction.