Optimize i2f()

2012-08-03 Thread Alex Deucher
On Mon, Jul 30, 2012 at 5:49 PM, Steven Fuerst wrote: > Looking through the kernel radeon drm source, it looks like the i2f() > functions in r600_blit.c and r600_blit_ksm() can be optimized a bit. Care to send a patch? Thanks, Alex > > The following extends the range to all unsigned 32bit inte

Re: Optimize i2f()

2012-08-03 Thread Alex Deucher
On Mon, Jul 30, 2012 at 5:49 PM, Steven Fuerst wrote: > Looking through the kernel radeon drm source, it looks like the i2f() > functions in r600_blit.c and r600_blit_ksm() can be optimized a bit. Care to send a patch? Thanks, Alex > > The following extends the range to all unsigned 32bit inte

Optimize i2f()

2012-07-30 Thread Steven Fuerst
Looking through the kernel radeon drm source, it looks like the i2f() functions in r600_blit.c and r600_blit_ksm() can be optimized a bit. The following extends the range to all unsigned 32bit integers, and avoids the slow loop by using the bsr instruction via __fls(). It provides an exact 1-1 co

Optimize i2f()

2012-07-30 Thread Steven Fuerst
Looking through the kernel radeon drm source, it looks like the i2f() functions in r600_blit.c and r600_blit_ksm() can be optimized a bit. The following extends the range to all unsigned 32bit integers, and avoids the slow loop by using the bsr instruction via __fls(). It provides an exact 1-1 co