summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600_blit.c
diff options
context:
space:
mode:
authorSteven Fuerst <svfuerst@gmail.com>2012-08-15 15:07:16 -0700
committerAlex Deucher <alexander.deucher@amd.com>2012-09-20 13:10:34 -0400
commit9e9eb7c60d57620bfe46b2a489e7f56a5925115a (patch)
tree8a22cea5cebee49a5e9bdbe205965270cc3414b4 /drivers/gpu/drm/radeon/r600_blit.c
parent747f49ba67b8895a5831ab539de551b916f3738c (diff)
downloadlinux-9e9eb7c60d57620bfe46b2a489e7f56a5925115a.tar.bz2
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_blit.c')
-rw-r--r--drivers/gpu/drm/radeon/r600_blit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/r600_blit.c b/drivers/gpu/drm/radeon/r600_blit.c
index 7d8ac42e3846..661fec2a2cc1 100644
--- a/drivers/gpu/drm/radeon/r600_blit.c
+++ b/drivers/gpu/drm/radeon/r600_blit.c
@@ -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;