diff options
author | Steven Fuerst <svfuerst@gmail.com> | 2012-08-15 18:07:16 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2012-09-20 13:10:34 -0400 |
commit | 9e9eb7c60d57620bfe46b2a489e7f56a5925115a (patch) | |
tree | 8a22cea5cebee49a5e9bdbe205965270cc3414b4 /drivers/gpu/drm/radeon | |
parent | 747f49ba67b8895a5831ab539de551b916f3738c (diff) |
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')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_blit.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_blit_shaders.h | 2 |
2 files changed, 2 insertions, 2 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) | |||
499 | * as the fractional bits will not fit in a float. (It would be better to | 499 | * as the fractional bits will not fit in a float. (It would be better to |
500 | * round towards even as the fpu does, but that is slower.) | 500 | * round towards even as the fpu does, but that is slower.) |
501 | */ | 501 | */ |
502 | uint32_t int2float(uint32_t x) | 502 | __pure uint32_t int2float(uint32_t x) |
503 | { | 503 | { |
504 | uint32_t msb, exponent, fraction; | 504 | uint32_t msb, exponent, fraction; |
505 | 505 | ||
diff --git a/drivers/gpu/drm/radeon/r600_blit_shaders.h b/drivers/gpu/drm/radeon/r600_blit_shaders.h index e17c2cbc6627..2f3ce7a75976 100644 --- a/drivers/gpu/drm/radeon/r600_blit_shaders.h +++ b/drivers/gpu/drm/radeon/r600_blit_shaders.h | |||
@@ -35,5 +35,5 @@ extern const u32 r6xx_default_state[]; | |||
35 | extern const u32 r6xx_ps_size, r6xx_vs_size; | 35 | extern const u32 r6xx_ps_size, r6xx_vs_size; |
36 | extern const u32 r6xx_default_size, r7xx_default_size; | 36 | extern const u32 r6xx_default_size, r7xx_default_size; |
37 | 37 | ||
38 | uint32_t int2float(uint32_t x); | 38 | __pure uint32_t int2float(uint32_t x); |
39 | #endif | 39 | #endif |