Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
flac
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
flac
Commits
67ea8bad
Commit
67ea8bad
authored
Feb 12, 2017
by
Erik de Castro Lopo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cpu.h: Add #defines so Clang compiles AVX2
Patch-from: <lvqcl.mail@gmail.com>
parent
c669249e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
src/libFLAC/include/private/cpu.h
src/libFLAC/include/private/cpu.h
+21
-4
No files found.
src/libFLAC/include/private/cpu.h
View file @
67ea8bad
...
...
@@ -88,8 +88,25 @@
#define FLAC__AVX2_SUPPORTED 1
#define FLAC__FMA_SUPPORTED 1
#endif
#elif defined __GNUC__
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))
/* since GCC 4.9 -msse.. compiler options aren't necessary */
#elif defined __GNUC__ || defined __clang__
#if defined __clang__ && __has_attribute(__target__)
/* clang */
#define FLAC__SSE_TARGET(x) __attribute__ ((__target__ (x)))
#if __has_builtin(__builtin_ia32_maxps)
#define FLAC__SSE_SUPPORTED 1
#endif
#if __has_builtin(__builtin_ia32_pmuludq128)
#define FLAC__SSE2_SUPPORTED 1
#endif
#if __has_builtin(__builtin_ia32_pabsd128)
#define FLAC__SSSE3_SUPPORTED 1
#endif
#if __has_builtin(__builtin_ia32_pmuldq128)
#define FLAC__SSE4_1_SUPPORTED 1
#endif
#if __has_builtin(__builtin_ia32_pabsd256)
#define FLAC__AVX2_SUPPORTED 1
#endif
#elif !defined __clang__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))
/* GCC 4.9+ */
#define FLAC__SSE_TARGET(x) __attribute__ ((__target__ (x)))
#define FLAC__SSE_SUPPORTED 1
#define FLAC__SSE2_SUPPORTED 1
...
...
@@ -100,7 +117,7 @@
#define FLAC__AVX2_SUPPORTED 1
#define FLAC__FMA_SUPPORTED 1
#endif
#else
/*
for GCC older than 4.9
*/
#else
/*
older GCC and clang
*/
#define FLAC__SSE_TARGET(x)
#ifdef __SSE__
#define FLAC__SSE_SUPPORTED 1
...
...
@@ -123,7 +140,7 @@
#ifdef __FMA__
#define FLAC__FMA_SUPPORTED 1
#endif
#endif
/* GCC version */
#endif
#endif
/* compiler version */
#endif
/* intrinsics support */
...
...
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