From: Steven Fuerst Date: Wed, 15 Aug 2012 22:07:15 +0000 (-0700) Subject: Replace int2float() with an optimized version. X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~20^2~3^2~70 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=747f49ba67b8895a5831ab539de551b916f3738c;p=pandora-kernel.git Replace int2float() with an optimized version. We use __fls() to find the most significant bit. Using that, the loop can be avoided. A second trick is to use the behaviour of the rotate instructions to expand the range of the unsigned int to float conversion to the full 32 bits in a branchless way. The routine is now exact up to 2^24. Above that, we truncate which is equivalent to rounding towards zero. Signed-off-by: Steven Fuerst --- Reading git-diff-tree failed