2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Run-Time Library
4 * PURPOSE: Memory functions for amd64
5 * FILE: lib/rtl/i386/rtlswap.S
6 * PROGRAMER: Timo Kreuzer (timo.kreuzer@reactos.org)
9 /* INCLUDES ******************************************************************/
11 #include <ndk/amd64/asmmacro.S>
13 /* FUNCTIONS *****************************************************************/
14 .intel_syntax noprefix
18 * IN CONST VOID *Source1, <rcx>
19 * IN CONST VOID *Source2, <rdx>
20 * IN SIZE_T Length <r8>
23 .proc RtlCompareMemory
31 /* Setup registers for compare */
35 /* Clear direction flag */
38 /* Get number of qwords */
56 /* Return the full count */
60 4: /* Not equal after comparing qwords */
61 /* Compare the last qword */
67 5: /* Not equal after comparing bytes */
68 /* Return difference */
73 6: /* Cleanup and return */