提交 9e9eb7c6 编写于 作者: S Steven Fuerst 提交者: Alex Deucher

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: NSteven Fuerst <svfuerst@gmail.com>
上级 747f49ba
......@@ -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;
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册