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
2df21a61
Commit
2df21a61
authored
7 years ago
by
Cameron Cawley
Committed by
Ralph Giles
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add CPU detection on RISC OS.
Signed-off-by:
Ralph Giles
<
giles@thaumas.net
>
parent
fa5707d6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/arm/armcpu.c
+38
-0
38 additions, 0 deletions
lib/arm/armcpu.c
with
38 additions
and
0 deletions
lib/arm/armcpu.c
+
38
−
0
View file @
2df21a61
...
...
@@ -107,6 +107,44 @@ ogg_uint32_t oc_cpu_flags_get(void){
return
flags
;
}
#elif defined(__riscos__)
#include
<kernel.h>
#include
<swis.h>
ogg_uint32_t
oc_cpu_flags_get
(
void
)
{
ogg_uint32_t
flags
=
0
;
#if defined(OC_ARM_ASM_EDSP) || defined(OC_ARM_ASM_MEDIA)
if
(
_swi
(
OS_Byte
,
_IN
(
0
)
|
_IN
(
2
)
|
_RETURN
(
1
),
129
,
0xFF
)
<=
0xA9
)
_swix
(
OS_Module
,
_INR
(
0
,
1
),
1
,
"System:Modules.CallASWI"
);
ogg_uint32_t
features
;
_kernel_oserror
*
test
=
_swix
(
OS_PlatformFeatures
,
_IN
(
0
)
|
_OUT
(
0
),
0
,
&
features
);
if
(
test
==
NULL
)
{
#if defined(OC_ARM_ASM_EDSP)
if
((
features
>>
10
&
1
)
==
1
)
flags
|=
OC_CPU_ARM_EDSP
;
#endif
#if defined(OC_ARM_ASM_MEDIA)
if
((
features
>>
31
&
1
)
==
1
)
{
ogg_uint32_t
shadd
=
0
;
test
=
_swix
(
OS_PlatformFeatures
,
_INR
(
0
,
1
)
|
_OUT
(
0
),
34
,
29
,
&
shadd
);
if
(
test
==
NULL
&&
shadd
==
1
)
flags
|=
OC_CPU_ARM_MEDIA
;
}
#endif
}
#endif
#if defined(OC_ARM_ASM_NEON)
ogg_uint32_t
mvfr1
;
test
=
_swix
(
VFPSupport_Features
,
_IN
(
0
)
|
_OUT
(
2
),
0
,
&
mvfr1
);
if
(
test
==
NULL
&&
(
mvfr1
&
0xFFF00
)
==
0x11100
)
flags
|=
OC_CPU_ARM_NEON
;
#endif
return
flags
;
}
#else
/*The feature registers which can tell us what the processor supports are
accessible in priveleged modes only, so we can't have a general user-space
...
...
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