Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
theora
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
theora
Commits
b56939f9
Commit
b56939f9
authored
17 years ago
by
sping
Browse files
Options
Downloads
Patches
Plain Diff
Variable renames for MSVC
svn path=/trunk/theora/; revision=13921
parent
dadb81c0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/cpu.c
+18
-18
18 additions, 18 deletions
lib/cpu.c
with
18 additions
and
18 deletions
lib/cpu.c
+
18
−
18
View file @
b56939f9
...
...
@@ -23,10 +23,10 @@
ogg_uint32_t
oc_cpu_flags_get
(
void
){
ogg_uint32_t
flags
=
0
;
ogg_uint32_t
eax
;
ogg_uint32_t
ebx
;
ogg_uint32_t
ecx
;
ogg_uint32_t
edx
;
ogg_uint32_t
v_
eax
;
ogg_uint32_t
v_
ebx
;
ogg_uint32_t
v_
ecx
;
ogg_uint32_t
v_
edx
;
#if defined(USE_ASM)
#if (defined(__amd64__) || defined(__x86_64__))
# define cpuid(_op,_eax,_ebx,_ecx,_edx) \
...
...
@@ -66,28 +66,28 @@ ogg_uint32_t oc_cpu_flags_get(void){
/*No cpuid.*/
if
(
eax
==
ebx
)
return
0
;
#endif
cpuid
(
0
,
eax
,
ebx
,
ecx
,
edx
);
if
(
ebx
==
0x756e6547
&&
edx
==
0x49656e69
&&
ecx
==
0x6c65746e
){
cpuid
(
0
,
v_
eax
,
v_
ebx
,
v_
ecx
,
v_
edx
);
if
(
v_
ebx
==
0x756e6547
&&
v_
edx
==
0x49656e69
&&
v_
ecx
==
0x6c65746e
){
/*Intel:*/
inteltest:
cpuid
(
1
,
eax
,
ebx
,
ecx
,
edx
);
if
((
edx
&
0x00800000
)
==
0
)
return
0
;
if
((
v_
edx
&
0x00800000
)
==
0
)
return
0
;
flags
=
OC_CPU_X86_MMX
;
if
(
edx
&
0x02000000
)
flags
|=
OC_CPU_X86_MMXEXT
|
OC_CPU_X86_SSE
;
if
(
edx
&
0x04000000
)
flags
|=
OC_CPU_X86_SSE2
;
if
(
v_
edx
&
0x02000000
)
flags
|=
OC_CPU_X86_MMXEXT
|
OC_CPU_X86_SSE
;
if
(
v_
edx
&
0x04000000
)
flags
|=
OC_CPU_X86_SSE2
;
}
else
if
(
ebx
==
0x68747541
&&
edx
==
0x69746e65
&&
ecx
==
0x444d4163
||
ebx
==
0x646f6547
&&
edx
==
0x79622065
&&
ecx
==
0x43534e20
){
else
if
(
v_
ebx
==
0x68747541
&&
v_
edx
==
0x69746e65
&&
v_
ecx
==
0x444d4163
||
v_
ebx
==
0x646f6547
&&
v_
edx
==
0x79622065
&&
v_
ecx
==
0x43534e20
){
/*AMD:*/
/*Geode:*/
cpuid
(
0x80000000
,
eax
,
ebx
,
ecx
,
edx
);
if
(
eax
<
0x80000001
)
goto
inteltest
;
cpuid
(
0x80000001
,
eax
,
ebx
,
ecx
,
edx
);
if
((
edx
&
0x00800000
)
==
0
)
return
0
;
cpuid
(
0x80000000
,
v_
eax
,
v_
ebx
,
v_
ecx
,
v_
edx
);
if
(
v_
eax
<
0x80000001
)
goto
inteltest
;
cpuid
(
0x80000001
,
v_
eax
,
v_
ebx
,
v_
ecx
,
v_
edx
);
if
((
v_
edx
&
0x00800000
)
==
0
)
return
0
;
flags
=
OC_CPU_X86_MMX
;
if
(
edx
&
0x80000000
)
flags
|=
OC_CPU_X86_3DNOW
;
if
(
edx
&
0x40000000
)
flags
|=
OC_CPU_X86_3DNOWEXT
;
if
(
edx
&
0x00400000
)
flags
|=
OC_CPU_X86_MMXEXT
;
if
(
v_
edx
&
0x80000000
)
flags
|=
OC_CPU_X86_3DNOW
;
if
(
v_
edx
&
0x40000000
)
flags
|=
OC_CPU_X86_3DNOWEXT
;
if
(
v_
edx
&
0x00400000
)
flags
|=
OC_CPU_X86_MMXEXT
;
}
else
{
/*Implement me.*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment