commit | d5897678eb555a797d4e84e07814d79f0e0bb465 | [log] [tgz] |
---|---|---|
author | Mark Mendell <mark.p.mendell@intel.com> | Wed Aug 12 21:16:41 2015 -0400 |
committer | Roland Levillain <rpl@google.com> | Mon Aug 17 12:36:34 2015 +0100 |
tree | bcf7df2382200011fb43a59f49d008852368b355 | |
parent | 8ecc1357e2c682165467ca8e10c7a748f7554df2 [diff] |
Implement CountLeadingZeros for x86 Generate Long and Integer numberOfLeadingZeros for x86 and x86_64. Uses 'bsr' instruction to find the first one bit, and then corrects the result. Added some more tests with constant values to test constant folding. Also add a runtime test with 0 as the input. Change-Id: I920b21bb00069bccf5f921f8f87a77e334114926 Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>