Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
84cf6aa2
Commit
84cf6aa2
authored
Dec 12, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement RtlU(short|long)ByteSwap() using fastcall bits.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
4708bb74
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-2
rtl.c
dlls/ntdll/rtl.c
+2
-2
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+16
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+2
-2
No files found.
dlls/ntdll/ntdll.spec
View file @
84cf6aa2
...
...
@@ -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)
...
...
dlls/ntdll/rtl.c
View file @
84cf6aa2
...
...
@@ -659,7 +659,7 @@ __ASM_FASTCALL_FUNC(RtlUlonglongByteSwap, 8,
* ix86 version takes argument in %ecx. Other systems use the inline version.
*/
#ifdef __i386__
__ASM_
GLOBAL_FUNC
(
NTDLL_RtlUlongByteSwap
,
__ASM_
FASTCALL_FUNC
(
RtlUlongByteSwap
,
4
,
"movl %ecx,%eax
\n\t
"
"bswap %eax
\n\t
"
"ret"
)
...
...
@@ -674,7 +674,7 @@ __ASM_GLOBAL_FUNC(NTDLL_RtlUlongByteSwap,
* i386 version takes argument in %cx. Other systems use the inline version.
*/
#ifdef __i386__
__ASM_
GLOBAL_FUNC
(
NTDLL_RtlUshortByteSwap
,
__ASM_
FASTCALL_FUNC
(
RtlUshortByteSwap
,
4
,
"movb %ch,%al
\n\t
"
"movb %cl,%ah
\n\t
"
"ret"
)
...
...
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
84cf6aa2
...
...
@@ -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
,
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
84cf6aa2
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment