[ros-dev] [ros-diffs] [dgorbachev] 53907: [NTOSKRNL] Use inline asm in KiIsNpxErrataPresent(). C code can be optimized in a wrong way.
aleksey at reactos.org
Sat Oct 1 19:22:34 UTC 2011
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.
More information about the Ros-dev