Commit 84cf6aa2 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

ntdll: Implement RtlU(short|long)ByteSwap() using fastcall bits.

parent 4708bb74
......@@ -1038,7 +1038,7 @@
@ stdcall RtlTryAcquireSRWLockShared(ptr)
@ stdcall RtlTryEnterCriticalSection(ptr)
@ stdcall RtlUTF8ToUnicodeN(ptr long ptr ptr long)
@ cdecl -i386 -norelay RtlUlongByteSwap() NTDLL_RtlUlongByteSwap
@ stdcall -fastcall -arch=i386 -norelay RtlUlongByteSwap(long)
@ stdcall -fastcall -arch=i386 -norelay RtlUlonglongByteSwap(int64)
# @ stub RtlUnhandledExceptionFilter2
# @ stub RtlUnhandledExceptionFilter
......@@ -1072,7 +1072,7 @@
@ stdcall RtlUpperString(ptr ptr)
@ stub RtlUsageHeap
@ stdcall -norelay RtlUserThreadStart(ptr ptr)
@ cdecl -i386 -norelay RtlUshortByteSwap() NTDLL_RtlUshortByteSwap
@ stdcall -fastcall -arch=i386 -norelay RtlUshortByteSwap(long)
@ stdcall RtlValidAcl(ptr)
@ stdcall RtlValidRelativeSecurityDescriptor(ptr long long)
@ stdcall RtlValidSecurityDescriptor(ptr)
......
......@@ -659,10 +659,10 @@ __ASM_FASTCALL_FUNC(RtlUlonglongByteSwap, 8,
* ix86 version takes argument in %ecx. Other systems use the inline version.
*/
#ifdef __i386__
__ASM_GLOBAL_FUNC(NTDLL_RtlUlongByteSwap,
"movl %ecx,%eax\n\t"
"bswap %eax\n\t"
"ret")
__ASM_FASTCALL_FUNC(RtlUlongByteSwap, 4,
"movl %ecx,%eax\n\t"
"bswap %eax\n\t"
"ret")
#endif
/*************************************************************************
......@@ -674,10 +674,10 @@ __ASM_GLOBAL_FUNC(NTDLL_RtlUlongByteSwap,
* i386 version takes argument in %cx. Other systems use the inline version.
*/
#ifdef __i386__
__ASM_GLOBAL_FUNC(NTDLL_RtlUshortByteSwap,
"movb %ch,%al\n\t"
"movb %cl,%ah\n\t"
"ret")
__ASM_FASTCALL_FUNC(RtlUshortByteSwap, 4,
"movb %ch,%al\n\t"
"movb %cl,%ah\n\t"
"ret")
#endif
......
......@@ -2188,6 +2188,22 @@ LONG FASTCALL NTOSKRNL_InterlockedIncrement( LONG volatile *dest )
#ifdef __i386__
/*************************************************************************
* RtlUshortByteSwap (NTOSKRNL.EXE.@)
*/
__ASM_FASTCALL_FUNC(RtlUshortByteSwap, 4,
"movb %ch,%al\n\t"
"movb %cl,%ah\n\t"
"ret")
/*************************************************************************
* RtlUlongByteSwap (NTOSKRNL.EXE.@)
*/
__ASM_FASTCALL_FUNC(RtlUlongByteSwap, 4,
"movl %ecx,%eax\n\t"
"bswap %eax\n\t"
"ret")
/*************************************************************************
* RtlUlonglongByteSwap (NTOSKRNL.EXE.@)
*/
__ASM_FASTCALL_FUNC(RtlUlonglongByteSwap, 8,
......
......@@ -67,9 +67,9 @@
@ stdcall -fastcall ObfDereferenceObject(ptr)
@ stdcall -fastcall ObfReferenceObject(ptr)
@ stub RtlPrefetchMemoryNonTemporal
@ cdecl -i386 -norelay RtlUlongByteSwap()
@ stdcall -fastcall -arch=i386 -norelay RtlUlongByteSwap(long)
@ stdcall -fastcall -arch=i386 -norelay RtlUlonglongByteSwap(int64)
@ cdecl -i386 -norelay RtlUshortByteSwap()
@ stdcall -fastcall -arch=i386 -norelay RtlUshortByteSwap(long)
@ stub WmiGetClock
@ stub Kei386EoiHelper
@ stub Kii386SpinOnSpinLock
......
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