Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
65345a5a
Commit
65345a5a
authored
Jun 19, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: Add CPU flag for the i686 cmov instruction
parent
29686d6e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
cpu.c
libavutil/cpu.c
+3
-1
cpu.h
libavutil/cpu.h
+2
-0
cpu.c
libavutil/x86/cpu.c
+2
-0
No files found.
libavutil/cpu.c
View file @
65345a5a
...
...
@@ -47,7 +47,7 @@ void av_set_cpu_flags_mask(int mask)
int
av_parse_cpu_flags
(
const
char
*
s
)
{
#define CPUFLAG_MMX2 (AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMX2)
#define CPUFLAG_MMX2 (AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMX2
| AV_CPU_FLAG_CMOV
)
#define CPUFLAG_3DNOW (AV_CPU_FLAG_3DNOW | AV_CPU_FLAG_MMX)
#define CPUFLAG_3DNOWEXT (AV_CPU_FLAG_3DNOWEXT | CPUFLAG_3DNOW)
#define CPUFLAG_SSE (AV_CPU_FLAG_SSE | CPUFLAG_MMX2)
...
...
@@ -82,6 +82,7 @@ int av_parse_cpu_flags(const char *s)
{
"fma4"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
CPUFLAG_FMA4
},
.
unit
=
"flags"
},
{
"3dnow"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
CPUFLAG_3DNOW
},
.
unit
=
"flags"
},
{
"3dnowext"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
CPUFLAG_3DNOWEXT
},
.
unit
=
"flags"
},
{
"cmov"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
AV_CPU_FLAG_CMOV
},
.
unit
=
"flags"
},
#elif ARCH_ARM
{
"armv5te"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
AV_CPU_FLAG_ARMV5TE
},
.
unit
=
"flags"
},
{
"armv6"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
AV_CPU_FLAG_ARMV6
},
.
unit
=
"flags"
},
...
...
@@ -143,6 +144,7 @@ static const struct {
{
AV_CPU_FLAG_FMA4
,
"fma4"
},
{
AV_CPU_FLAG_3DNOW
,
"3dnow"
},
{
AV_CPU_FLAG_3DNOWEXT
,
"3dnowext"
},
{
AV_CPU_FLAG_CMOV
,
"cmov"
},
#endif
{
0
}
};
...
...
libavutil/cpu.h
View file @
65345a5a
...
...
@@ -40,6 +40,8 @@
#define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used
#define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions
#define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions
#define AV_CPU_FLAG_CMOV 0x1000 ///< i686 cmov
#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
#define AV_CPU_FLAG_ARMV5TE (1 << 0)
...
...
libavutil/x86/cpu.c
View file @
65345a5a
...
...
@@ -83,6 +83,8 @@ int ff_get_cpu_flags_x86(void)
cpuid
(
1
,
eax
,
ebx
,
ecx
,
std_caps
);
family
=
((
eax
>>
8
)
&
0xf
)
+
((
eax
>>
20
)
&
0xff
);
model
=
((
eax
>>
4
)
&
0xf
)
+
((
eax
>>
12
)
&
0xf0
);
if
(
std_caps
&
(
1
<<
15
))
rval
|=
AV_CPU_FLAG_CMOV
;
if
(
std_caps
&
(
1
<<
23
))
rval
|=
AV_CPU_FLAG_MMX
;
if
(
std_caps
&
(
1
<<
25
))
...
...
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