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
1e51e517
Commit
1e51e517
authored
Jun 27, 2015
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/x86/intmath: use bzhi gcc builtin in av_mod_uintp2()
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
5cccbc3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
intmath.h
libavutil/x86/intmath.h
+7
-0
No files found.
libavutil/x86/intmath.h
View file @
1e51e517
...
...
@@ -39,6 +39,12 @@
#if defined(__BMI2__)
#if AV_GCC_VERSION_AT_LEAST(5,1)
#define av_mod_uintp2 __builtin_ia32_bzhi_si
#else
/* GCC releases before 5.1.0 have a broken bzhi builtin, so for those we
* implement it using inline assembly
*/
#define av_mod_uintp2 av_mod_uintp2_bmi2
static
av_always_inline
av_const
unsigned
av_mod_uintp2_bmi2
(
unsigned
a
,
unsigned
p
)
{
...
...
@@ -50,6 +56,7 @@ static av_always_inline av_const unsigned av_mod_uintp2_bmi2(unsigned a, unsigne
return
x
;
}
}
#endif
/* AV_GCC_VERSION_AT_LEAST */
#endif
/* __BMI2__ */
...
...
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