With one inline asm-statement this function would smaler and faster.
And the comment for
 *  ulCount [I] Number of bytes to write
need change.

And one question,
How can I start ntdll_test.exe.so in wine ?

Dietrich

/*************************************************************************
 * RtlFillMemoryUlong   [EMAIL PROTECTED]
 *
 * Fill memory with a 32 bit (dword) value.
 *
 * PARAMS
 *  lpDest  [I] Bitmap pointer
 *  ulCount [I] Number of bytes to write
 *  ulValue [I] Value to fill with
 *
 * RETURNS
 *  Nothing.
 */
VOID WINAPI RtlFillMemoryUlong(ULONG* lpDest, ULONG ulCount, ULONG ulValue)
{
  TRACE("(%p,%ld,%ld)\n", lpDest, ulCount, ulValue);

#if 1
  ulCount /= sizeof(ULONG);
 __asm__ __volatile__("rep stosl"
                       :
                       :"D" (lpDest), "c" (ulCount), "a" (ulValue));
#else
  ulCount /= sizeof(ULONG);
  while(ulCount--)
    *lpDest++ = ulValue;
#endif
}





Reply via email to