Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
e6f6fe38
Commit
e6f6fe38
authored
Oct 11, 2013
by
Ahmed Samy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cpuid: remove the static func has_feature
Signed-off-by:
Ahmed Samy
<
f.fallen45@gmail.com
>
parent
55b3c66c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
17 deletions
+9
-17
ccan/cpuid/cpuid.c
ccan/cpuid/cpuid.c
+9
-17
No files found.
ccan/cpuid/cpuid.c
View file @
e6f6fe38
...
@@ -90,22 +90,6 @@ static struct {
...
@@ -90,22 +90,6 @@ static struct {
{
CEF_XOP
,
1
<<
11
,
false
}
{
CEF_XOP
,
1
<<
11
,
false
}
};
};
static
bool
has_feature
(
int
feature
,
uint32_t
ecx
,
uint32_t
edx
)
{
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
features
)
/
sizeof
(
features
[
0
]);
++
i
)
{
if
(
features
[
i
].
feature
==
feature
)
{
if
(
features
[
i
].
use_edx
)
return
(
edx
&
features
[
i
].
mask
);
else
return
(
ecx
&
features
[
i
].
mask
);
}
}
return
false
;
}
bool
cpuid_is_supported
(
void
)
bool
cpuid_is_supported
(
void
)
{
{
/* The following assembly code uses EAX as the return value,
/* The following assembly code uses EAX as the return value,
...
@@ -180,7 +164,15 @@ bool cpuid_has_feature(int feature, bool extended)
...
@@ -180,7 +164,15 @@ bool cpuid_has_feature(int feature, bool extended)
else
else
___cpuid
(
CPU_EXTENDED_PROC_INFO_FEATURE_BITS
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
___cpuid
(
CPU_EXTENDED_PROC_INFO_FEATURE_BITS
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
return
has_feature
(
feature
,
ecx
,
edx
);
for
(
i
=
0
;
i
<
sizeof
(
features
)
/
sizeof
(
features
[
0
]);
++
i
)
{
if
(
features
[
i
].
feature
==
feature
)
{
if
(
features
[
i
].
use_edx
)
return
(
edx
&
features
[
i
].
mask
);
else
return
(
ecx
&
features
[
i
].
mask
);
}
}
return
false
;
}
}
static
const
char
*
const
cpuids
[]
=
{
static
const
char
*
const
cpuids
[]
=
{
...
...
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