Use ZF flag for the 0 case
Instead of explicitly testing for 0, using the ZF flag after the `BSR` instruction which is set to true if the source is 0. We also assume that `BSR` in this case leaves the destination unchanged even though the Intel docs say the result is undefined in this case, but the AMD docs say it is unchanged. See !194 for more references that say this is true for Intel too.
Loading
Please sign in to comment