On Oct 1, 2011, at 10:39 PM, Dmitry Gorbachev wrote:
Those three intrinsics should be barriers -- why is it moving the math outside?
The math does not read or write any memory, and the result lies in a register. It can be lawfully moved across the barriers.
So, as I understand, you want C code back?
Since this code is not portable at all by definition, the only reason to make it C would be to support more compilers. However if compiler becomes a problem here (that was the root of the problem), I would advise to make an exception and leave the new code in assembly.