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

SHL/SAL/SHR/SAR (the shifts) affect the condition codes so one could check for overflow (or use it as part of multibyte arithmetic) while LEA does not affect the conditions code (so overflow goes undetected). It's something else to keep in mind.


Indeed! And this is not necessarily a downside, sometimes you want to preserve the flags.

Intell added the MULX instruction that is similar to MUL, except that it doesn't touch the flags. It's very useful in bignum math.




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

Search: