[Patch v2 1/4] Replace i2f() in r600_blit.c with an optimized version.

2012-08-14 Thread Michel Dänzer
On Sam, 2012-08-11 at 10:30 -0700, Steven Fuerst wrote: > 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

Re: [Patch v2 1/4] Replace i2f() in r600_blit.c with an optimized version.

2012-08-14 Thread Michel Dänzer
On Sam, 2012-08-11 at 10:30 -0700, Steven Fuerst wrote: > 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

[Patch v2 1/4] Replace i2f() in r600_blit.c with an optimized version.

2012-08-13 Thread Steven Fuerst
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

[Patch v2 1/4] Replace i2f() in r600_blit.c with an optimized version.

2012-08-11 Thread Steven Fuerst
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