By: Linus Torvalds (torvalds.delete@this.linux-foundation.org), August 21, 2013 9:50 am
Room: Moderated Discussions
TREZA (no.delete@this.ema.il) on August 21, 2013 6:06 am wrote:
>
> x86 never handled properly the "trap and emulate" method. It would have helped get rid of some odd legacy
> instructions.
No.
Trap-and-emulate is a "solution" only in a diseased and sick mind. It doesn't solve anything (because it still leaves all huge legacy issues, even if they are now "only" at a system level), but equally importantly, even for the half-arsed case that it purports to solve, it does so in a really bad fashion.
The way to do "trap and emulate" is to use microcode. It really is that simple. Anybody who says that microcode is worse than trapping isn't interested in either technical arguments or in usability, but purely in furthering some personal agenda, probably fueled by some odd mental quirk ("microcode is evil" with no actual reason behind it).
Compatibility is important. Performance is important. "Trap and emulate" breaks both. Don't do it.
Linus
>
> x86 never handled properly the "trap and emulate" method. It would have helped get rid of some odd legacy
> instructions.
No.
Trap-and-emulate is a "solution" only in a diseased and sick mind. It doesn't solve anything (because it still leaves all huge legacy issues, even if they are now "only" at a system level), but equally importantly, even for the half-arsed case that it purports to solve, it does so in a really bad fashion.
The way to do "trap and emulate" is to use microcode. It really is that simple. Anybody who says that microcode is worse than trapping isn't interested in either technical arguments or in usability, but purely in furthering some personal agenda, probably fueled by some odd mental quirk ("microcode is evil" with no actual reason behind it).
Compatibility is important. Performance is important. "Trap and emulate" breaks both. Don't do it.
Linus