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
15320277
Commit
15320277
authored
Jul 03, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix the calling convention for runtime 64-bit shift functions.
Based on a patch by Zhao Yi.
parent
ebcb18d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
44 deletions
+42
-44
large_int.c
dlls/ntdll/large_int.c
+36
-38
ntdll.spec
dlls/ntdll/ntdll.spec
+3
-3
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+3
-3
No files found.
dlls/ntdll/large_int.c
View file @
15320277
...
...
@@ -809,41 +809,56 @@ ULONGLONG WINAPI _aulldiv( ULONGLONG a, ULONGLONG b )
return
udivmod
(
a
,
b
,
NULL
);
}
LONGLONG
__stdcall
__regs__allshl
(
LONGLONG
a
,
unsigned
char
b
)
{
return
a
<<
b
;
}
/******************************************************************************
* _allshl (NTDLL.@)
*
* Shift a 64 bit integer to the left.
*
* PARAMS
* a [I] Initial number.
* b [I] Number to shift a by to the left.
*
* RETURNS
* The left-shifted value.
*/
LONGLONG
WINAPI
_allshl
(
LONGLONG
a
,
LONG
b
)
__ASM_GLOBAL_FUNC
(
_allshl
,
"xchgl (%esp),%ecx
\n\t
"
"pushl %edx
\n\t
"
"pushl %eax
\n\t
"
"pushl %ecx
\n\t
"
"jmp "
__ASM_STDCALL
(
"__regs__allshl"
,
12
)
)
LONGLONG
__stdcall
__regs__allshr
(
LONGLONG
a
,
unsigned
char
b
)
{
return
a
<<
b
;
return
a
>>
b
;
}
/******************************************************************************
* _allshr (NTDLL.@)
*
* Shift a 64 bit integer to the right.
*
* PARAMS
* a [I] Initial number.
* b [I] Number to shift a by to the right.
*
* RETURNS
* The right-shifted value.
*/
LONGLONG
WINAPI
_allshr
(
LONGLONG
a
,
LONG
b
)
__ASM_GLOBAL_FUNC
(
_allshr
,
"xchgl (%esp),%ecx
\n\t
"
"pushl %edx
\n\t
"
"pushl %eax
\n\t
"
"pushl %ecx
\n\t
"
"jmp "
__ASM_STDCALL
(
"__regs__allshr"
,
12
)
)
ULONGLONG
__stdcall
__regs__aullshr
(
ULONGLONG
a
,
unsigned
char
b
)
{
return
a
>>
b
;
}
/******************************************************************************
* _allshr (NTDLL.@)
*/
__ASM_GLOBAL_FUNC
(
_aullshr
,
"xchgl (%esp),%ecx
\n\t
"
"pushl %edx
\n\t
"
"pushl %eax
\n\t
"
"pushl %ecx
\n\t
"
"jmp "
__ASM_STDCALL
(
"__regs__aullshr"
,
12
)
)
/******************************************************************************
* _alldvrm (NTDLL.@)
*
* Divide two 64 bit integers.
...
...
@@ -900,23 +915,6 @@ ULONGLONG WINAPI _aullrem( ULONGLONG a, ULONGLONG b )
}
/******************************************************************************
* _aullshr (NTDLL.@)
*
* Shift a 64 bit unsigned integer to the right.
*
* PARAMS
* a [I] Initial number.
* b [I] Number to shift a by to the right.
*
* RETURNS
* The right-shifted value.
*/
ULONGLONG
WINAPI
_aullshr
(
ULONGLONG
a
,
LONG
b
)
{
return
a
>>
b
;
}
/******************************************************************************
* _aulldvrm (NTDLL.@)
*
* Divide two 64 bit unsigned integers.
...
...
dlls/ntdll/ntdll.spec
View file @
15320277
...
...
@@ -1492,13 +1492,13 @@
@ cdecl -norelay -arch=i386 -ret64 _allmul(int64 int64)
@ cdecl -arch=i386 -norelay _alloca_probe()
@ cdecl -norelay -arch=i386 -ret64 _allrem(int64 int64)
@
stdcall
-arch=i386 -ret64 _allshl(int64 long)
@
stdcall
-arch=i386 -ret64 _allshr(int64 long)
@
cdecl -norelay
-arch=i386 -ret64 _allshl(int64 long)
@
cdecl -norelay
-arch=i386 -ret64 _allshr(int64 long)
@ cdecl -ret64 _atoi64(str)
@ cdecl -norelay -arch=i386 -ret64 _aulldiv(int64 int64)
@ cdecl -arch=i386 -norelay _aulldvrm(int64 int64)
@ cdecl -norelay -arch=i386 -ret64 _aullrem(int64 int64)
@
stdcall
-arch=i386 -ret64 _aullshr(int64 long)
@
cdecl -norelay
-arch=i386 -ret64 _aullshr(int64 long)
@ cdecl -arch=i386 -norelay _chkstk()
@ stub _fltused
@ cdecl -arch=i386 -ret64 _ftol()
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
15320277
...
...
@@ -1540,12 +1540,12 @@
@ cdecl -arch=i386 -norelay -ret64 _allmul(int64 int64)
@ cdecl -arch=i386 -norelay _alloca_probe()
@ cdecl -arch=i386 -norelay -ret64 _allrem(int64 int64)
@
stdcall -arch=i386
-ret64 _allshl(int64 long)
@
stdcall -arch=i386
-ret64 _allshr(int64 long)
@
cdecl -arch=i386 -norelay
-ret64 _allshl(int64 long)
@
cdecl -arch=i386 -norelay
-ret64 _allshr(int64 long)
@ cdecl -arch=i386 -norelay -ret64 _aulldiv(int64 int64)
@ cdecl -arch=i386 -norelay _aulldvrm(int64 int64)
@ cdecl -arch=i386 -norelay -ret64 _aullrem(int64 int64)
@
stdcall -arch=i386
-ret64 _aullshr(int64 long)
@
cdecl -arch=i386 -norelay
-ret64 _aullshr(int64 long)
@ cdecl -arch=i386 -norelay _chkstk()
@ cdecl -arch=i386 _except_handler2(ptr ptr ptr ptr)
@ cdecl -arch=i386 _except_handler3(ptr ptr ptr ptr)
...
...
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