Re: bsr-algorithm?



So what you're really trying to do is to write a custom int->fp
conversion algorithm, instead of using one of the formats that the hw
supports directly, and which will be orders of magnitude faster?

Yes. But fp->int anf fp->fp transcoding too. And actually I have
working and correct code since a year. I just want a MMX-variation of
bsr.

[... the description of the fp->fp trancoder ...]

You forgot subnormal numbers, and nan-conversion.

As usual, when you explain the real problem, the fast solution is
totally different from what you initially expected.

Yes, it is unexpected. The importf()-codepath indeed is fbpos-free. I
did'n think of importf((float)short). The problem is that importf()
[the algorithm you described above] is about twice as complicated as
importl() [both include sub/nan/inf handling].
I doubt [importf] it is actually faster [than importl] on GPRs with
bsr.

I can't make a MMX-version of it without bsr anyway. You gave me the
correct advice to (mis)use the floating-point conversion function for
bsr-emulation, which is crazy, but it works.

Good luck!

Thanks
Niels

.