]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
Annotate int2float() as being a pure function.
authorSteven Fuerst <svfuerst@gmail.com>
Wed, 15 Aug 2012 22:07:16 +0000 (15:07 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 Sep 2012 17:10:34 +0000 (13:10 -0400)
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>
drivers/gpu/drm/radeon/r600_blit.c
drivers/gpu/drm/radeon/r600_blit_shaders.h

index 7d8ac42e38460338f80fdbcb2489f49907cbb69e..661fec2a2cc144bf16df85171e7aa498352e84b7 100644 (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;
 
index e17c2cbc66274749944f3082b0443a8fd6813810..2f3ce7a75976d1757e227b3373c16a9d048bf52a 100644 (file)
@@ -35,5 +35,5 @@ extern const u32 r6xx_default_state[];
 extern const u32 r6xx_ps_size, r6xx_vs_size;
 extern const u32 r6xx_default_size, r7xx_default_size;
 
-uint32_t int2float(uint32_t x);
+__pure uint32_t int2float(uint32_t x);
 #endif