http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53190

--- Comment #8 from Andreas Jaeger <aj at gcc dot gnu.org> 2012-05-03 09:19:16 
UTC ---
So, how should the inline rewritten?

Adding volatile is one option:
extern __inline __attribute__ ((__always_inline__)) long int
__attribute__ ((__nothrow__ )) lrintf (float __x)
{
  long int __res;
  __asm __volatile__ ("cvtss2si %1, %0" : "=r" (__res) : "xm" (__x));
  return __res;
}

Since this is SSE code: Is there any way to clobber the SSE control register?
Any better way to write the above?

Btw. I'd like to make two changes for glibc:
* Fix the inline
* Only declare the inline when lrintf is not available as builtin. lrint was
introduce in 2003-08-28, so should be part of gcc 3.4 and therefore for GCC 3.4
and newer my patch will not use the above anymore.

Reply via email to