Re: [Qemu-devel] [PATCH v2 6/6] Make pow2ceil() and pow2floor() inline

2015-08-14 Thread Paolo Bonzini
On 24/07/2015 14:33, Peter Maydell wrote: > Since the pow2floor() function is now used in a hot code path, > make it inline; for consistency, provide pow2ceil() as an inline > function too. > > Because these functions use ctz64() we have to put the inline > versions into host-utils.h, so they ha

[Qemu-devel] [PATCH v2 6/6] Make pow2ceil() and pow2floor() inline

2015-07-24 Thread Peter Maydell
Since the pow2floor() function is now used in a hot code path, make it inline; for consistency, provide pow2ceil() as an inline function too. Because these functions use ctz64() we have to put the inline versions into host-utils.h, so they have access to ctz64(), and move the inline is_power_of_2(