RtlFillMemoryUlong

Dietrich Teickner dietrich_teickner at arcor.de
Sun Feb 13 03:31:12 CST 2005


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   [NTDLL.@]
  *
  * 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
}





More information about the wine-devel mailing list