Annotate int2float() as being a pure function.

This allows gcc to fold duplicate calls into a single call.  Since
the current users do actually call it multiple times with the
same arguments, this is an obvious win.

Signed-off-by: Steven Fuerst <svfuerst@gmail.com>
This commit is contained in:
Steven Fuerst
2012-08-15 15:07:16 -07:00
committed by Alex Deucher
parent 747f49ba67
commit 9e9eb7c60d
2 changed files with 2 additions and 2 deletions

View File

@@ -499,7 +499,7 @@ set_default_state(drm_radeon_private_t *dev_priv)
* as the fractional bits will not fit in a float. (It would be better to
* round towards even as the fpu does, but that is slower.)
*/
uint32_t int2float(uint32_t x)
__pure uint32_t int2float(uint32_t x)
{
uint32_t msb, exponent, fraction;