Commit d0aef218 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Fixed strict aliasing problem in RtlEnlargedUnsignedDivide.

parent 50dff3b4
......@@ -141,10 +141,14 @@ ULONGLONG WINAPI RtlEnlargedUnsignedMultiply( UINT a, UINT b )
UINT WINAPI RtlEnlargedUnsignedDivide( ULONGLONG a, UINT b, UINT *remptr )
{
#if defined(__i386__) && defined(__GNUC__)
UINT ret, rem;
UINT ret, rem, p1, p2;
p1 = a >> 32;
p2 = a & 0xffffffffLL;
__asm__("div %4,%%eax"
: "=a" (ret), "=d" (rem)
: "0" (*(UINT*)&a), "1" (*((UINT*)&a+1)), "g" (b) );
: "0" (p2), "1" (p1), "g" (b) );
if (remptr) *remptr = rem;
return ret;
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment