On 12/10/05, Jim Leonard <trixter at oldskool.org> wrote:
I was always a little disappointed that the 8087
didn't speed up integer
math
any (FDIV was at least 193 cycles, whereas DIV is never more than 162)...
I
could have really used that.
It speeds up 32 bit and 64 bit integer math.....
Even on newer processors it was floating point was useful for many non-FP
things. Desipte intel's documentation to the contrary, the fastest block
transfer loop on the (pre-MMX) Pentium was done using FILDQ-FISTPQ.
// GCC w/ AT&T Assembly warning!!!
inline void copy64(int *p1,int *p2, int n)
{
asm("
test $1,%2
jz 0f
dec %2
movl (%0,%2,4),%%ebx
movl %%ebx,(%1,%2,4)
0:
shrl %2
dec %2
jl 2f
1:
fildq (%0,%2,8)
fistpq (%1,%2,8)
dec %2
jge 1b
2:
"
:
: "S" (p1), "D" (p2), "c" (n)
: "ebx");
}