Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9ef72462
Commit
9ef72462
authored
Jul 05, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Avoid depending on compiler support for 64-bit shift functions.
parent
42636254
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
3 deletions
+42
-3
large_int.c
dlls/ntdll/large_int.c
+42
-3
No files found.
dlls/ntdll/large_int.c
View file @
9ef72462
...
...
@@ -812,7 +812,20 @@ ULONGLONG WINAPI _aulldiv( ULONGLONG a, ULONGLONG b )
LONGLONG
__stdcall
__regs__allshl
(
LONGLONG
a
,
unsigned
char
b
)
{
return
a
<<
b
;
const
LARGE_INTEGER
x
=
{
.
QuadPart
=
a
};
LARGE_INTEGER
ret
;
if
(
b
>=
32
)
{
ret
.
HighPart
=
x
.
LowPart
<<
(
b
&
31
);
ret
.
LowPart
=
0
;
}
else
{
ret
.
HighPart
=
(
x
.
LowPart
>>
(
32
-
b
))
|
(
x
.
HighPart
<<
b
);
ret
.
LowPart
=
x
.
LowPart
<<
b
;
}
return
ret
.
QuadPart
;
}
/******************************************************************************
...
...
@@ -828,7 +841,20 @@ __ASM_GLOBAL_FUNC( _allshl,
LONGLONG
__stdcall
__regs__allshr
(
LONGLONG
a
,
unsigned
char
b
)
{
return
a
>>
b
;
const
LARGE_INTEGER
x
=
{
.
QuadPart
=
a
};
LARGE_INTEGER
ret
;
if
(
b
>=
32
)
{
ret
.
HighPart
=
x
.
HighPart
>>
31
;
ret
.
LowPart
=
x
.
HighPart
>>
(
b
&
31
);
}
else
{
ret
.
HighPart
=
x
.
HighPart
>>
b
;
ret
.
LowPart
=
(
x
.
HighPart
<<
(
32
-
b
))
|
(
x
.
LowPart
>>
b
);
}
return
ret
.
QuadPart
;
}
/******************************************************************************
...
...
@@ -844,7 +870,20 @@ __ASM_GLOBAL_FUNC( _allshr,
ULONGLONG
__stdcall
__regs__aullshr
(
ULONGLONG
a
,
unsigned
char
b
)
{
return
a
>>
b
;
const
ULARGE_INTEGER
x
=
{
.
QuadPart
=
a
};
ULARGE_INTEGER
ret
;
if
(
b
>=
32
)
{
ret
.
HighPart
=
0
;
ret
.
LowPart
=
x
.
HighPart
>>
(
b
&
31
);
}
else
{
ret
.
HighPart
=
x
.
HighPart
>>
b
;
ret
.
LowPart
=
(
x
.
HighPart
<<
(
32
-
b
))
|
(
x
.
LowPart
>>
b
);
}
return
ret
.
QuadPart
;
}
/******************************************************************************
...
...
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