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
89c63fd3
Commit
89c63fd3
authored
Jan 20, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fix some bad left-over uses of value in the CPU detection code.
parent
a82cdfc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
cpu.c
dlls/kernel32/cpu.c
+8
-7
No files found.
dlls/kernel32/cpu.c
View file @
89c63fd3
...
...
@@ -569,7 +569,7 @@ VOID WINAPI GetSystemInfo(
#endif
#ifdef CPU_SSE2
mib
[
1
]
=
CPU_SSE2
;
/* this should imply MMX */
val
ue
[
1
]
=
sizeof
(
value
);
val
_len
=
sizeof
(
value
);
if
(
sysctl
(
mib
,
2
,
&
value
,
&
val_len
,
NULL
,
0
)
>=
0
)
if
(
value
)
PF
[
PF_MMX_INSTRUCTIONS_AVAILABLE
]
=
TRUE
;
#endif
...
...
@@ -578,7 +578,7 @@ VOID WINAPI GetSystemInfo(
val_len
=
sizeof
(
value
);
if
(
sysctl
(
mib
,
2
,
&
value
,
&
val_len
,
NULL
,
0
)
>=
0
)
if
(
value
>
cachedsi
.
dwNumberOfProcessors
)
cachedsi
.
dwNumberOfProcessors
=
value
[
0
]
;
cachedsi
.
dwNumberOfProcessors
=
value
;
mib
[
1
]
=
HW_MODEL
;
val_len
=
sizeof
(
model
)
-
1
;
if
(
sysctl
(
mib
,
2
,
model
,
&
val_len
,
NULL
,
0
)
>=
0
)
{
...
...
@@ -614,16 +614,17 @@ VOID WINAPI GetSystemInfo(
if
(
f
!=
NULL
)
{
while
(
fgets
(
model
,
255
,
f
)
!=
NULL
)
{
if
(
sscanf
(
model
,
"cpu%d: features %x<"
,
value
,
value
+
1
)
==
2
)
{
int
cpu
,
features
;
if
(
sscanf
(
model
,
"cpu%d: features %x<"
,
&
cpu
,
&
features
)
==
2
)
{
/* we could scan the string but it is easier
to test the bits directly */
if
(
value
[
1
]
&
0x1
)
if
(
features
&
0x1
)
PF
[
PF_FLOATING_POINT_EMULATED
]
=
TRUE
;
if
(
value
[
1
]
&
0x10
)
if
(
features
&
0x10
)
PF
[
PF_RDTSC_INSTRUCTION_AVAILABLE
]
=
TRUE
;
if
(
value
[
1
]
&
0x100
)
if
(
features
&
0x100
)
PF
[
PF_COMPARE_EXCHANGE_DOUBLE
]
=
TRUE
;
if
(
value
[
1
]
&
0x800000
)
if
(
features
&
0x800000
)
PF
[
PF_MMX_INSTRUCTIONS_AVAILABLE
]
=
TRUE
;
break
;
...
...
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