Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, it's like someone looked at TZCNT and thought "let's encode LZCNT the same way", but it makes no sense.


LZCNT and TZCNT are corrections (originally introduced by AMD) for the serious mistake done by the designers of Intel 80386 when they have defined BSF and BSR.

Because on the very slow 80386 the wrong definition for the null input did not matter much, they have failed to foresee how bad it will become for the future pipelined and superscalar CPUs, where having to insert a test for null input can slow down a program many times.

Nevertheless, they should have paid more attention to the earlier use of such instructions. For instance Cray-1 had defined LZCNT in the right way almost ten years earlier.


LZCNT was introduced by Intel in BMI1, while TZCNT was introduced by AMD.




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

Search: