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
010d44a2
Commit
010d44a2
authored
Nov 04, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vcomp: Fix signed char issues.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
15ecb13d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
main.c
dlls/vcomp/main.c
+6
-6
vcomp.c
dlls/vcomp/tests/vcomp.c
+7
-7
No files found.
dlls/vcomp/main.c
View file @
010d44a2
...
...
@@ -431,10 +431,10 @@ void CDECL _vcomp_atomic_and_i1(char *dest, char val)
do
old
=
*
dest
;
while
(
interlocked_cmpxchg8
(
dest
,
old
&
val
,
old
)
!=
old
);
}
void
CDECL
_vcomp_atomic_div_i1
(
char
*
dest
,
char
val
)
void
CDECL
_vcomp_atomic_div_i1
(
signed
char
*
dest
,
signed
char
val
)
{
char
old
;
do
old
=
*
dest
;
while
(
interlocked_cmpxchg8
(
dest
,
old
/
val
,
old
)
!=
old
);
signed
char
old
;
do
old
=
*
dest
;
while
(
(
signed
char
)
interlocked_cmpxchg8
((
char
*
)
dest
,
old
/
val
,
old
)
!=
old
);
}
void
CDECL
_vcomp_atomic_div_ui1
(
unsigned
char
*
dest
,
unsigned
char
val
)
...
...
@@ -461,10 +461,10 @@ void CDECL _vcomp_atomic_shl_i1(char *dest, unsigned int val)
do
old
=
*
dest
;
while
(
interlocked_cmpxchg8
(
dest
,
old
<<
val
,
old
)
!=
old
);
}
void
CDECL
_vcomp_atomic_shr_i1
(
char
*
dest
,
unsigned
int
val
)
void
CDECL
_vcomp_atomic_shr_i1
(
signed
char
*
dest
,
unsigned
int
val
)
{
char
old
;
do
old
=
*
dest
;
while
(
interlocked_cmpxchg8
(
dest
,
old
>>
val
,
old
)
!=
old
);
signed
char
old
;
do
old
=
*
dest
;
while
(
(
signed
char
)
interlocked_cmpxchg8
((
char
*
)
dest
,
old
>>
val
,
old
)
!=
old
);
}
void
CDECL
_vcomp_atomic_shr_ui1
(
unsigned
char
*
dest
,
unsigned
int
val
)
...
...
dlls/vcomp/tests/vcomp.c
View file @
010d44a2
...
...
@@ -1549,7 +1549,7 @@ static void test_atomic_integer8(void)
struct
{
void
(
CDECL
*
func
)(
char
*
,
char
);
char
v1
,
v2
,
expected
;
signed
char
v1
,
v2
,
expected
;
}
tests1
[]
=
{
...
...
@@ -1566,9 +1566,9 @@ static void test_atomic_integer8(void)
struct
{
void
(
CDECL
*
func
)(
char
*
,
unsigned
int
);
char
v1
;
signed
char
v1
;
unsigned
int
v2
;
char
expected
;
signed
char
expected
;
}
tests2
[]
=
{
...
...
@@ -1616,14 +1616,14 @@ static void test_atomic_integer8(void)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests1
);
i
++
)
{
char
val
=
tests1
[
i
].
v1
;
tests1
[
i
].
func
(
&
val
,
tests1
[
i
].
v2
);
signed
char
val
=
tests1
[
i
].
v1
;
tests1
[
i
].
func
(
(
char
*
)
&
val
,
tests1
[
i
].
v2
);
ok
(
val
==
tests1
[
i
].
expected
,
"test %d: expected val == %d, got %d
\n
"
,
i
,
tests1
[
i
].
expected
,
val
);
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests2
);
i
++
)
{
char
val
=
tests2
[
i
].
v1
;
tests2
[
i
].
func
(
&
val
,
tests2
[
i
].
v2
);
signed
char
val
=
tests2
[
i
].
v1
;
tests2
[
i
].
func
(
(
char
*
)
&
val
,
tests2
[
i
].
v2
);
ok
(
val
==
tests2
[
i
].
expected
,
"test %d: expected val == %d, got %d
\n
"
,
i
,
tests2
[
i
].
expected
,
val
);
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests3
);
i
++
)
...
...
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