cvs commit: src/lib/msun/src math_private.h
bde at FreeBSD.org
Fri Feb 22 14:11:04 UTC 2008
bde 2008-02-22 14:11:03 UTC
FreeBSD src repository
Add an irint() function in inline asm for amd64 and i386. irint() is
the same as lrint() except it returns int instead of long. Though the
extern lrint() is fairly fast on these arches, it still takes about
12 cycles longer than the inline version, and 12 cycles is a lot in
applications where [li]rint() is used to avoid slow conversions that
are only a couple of times slower.
This is only for internal use. The libm versions of *rint*() should
also be inline, but that would take would take more header engineering.
Implementing irint() instead of lrint() also avoids a conflict with
the extern declaration of the latter.
Revision Changes Path
1.25 +30 -0 src/lib/msun/src/math_private.h
More information about the cvs-all