2015-03-25 17:22:41 +00:00
|
|
|
# Copyright 2015 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
2015-02-12 18:48:25 +00:00
|
|
|
# Gyp file for building opts target.
|
2011-05-31 13:50:51 +00:00
|
|
|
{
|
2015-01-27 02:55:58 +00:00
|
|
|
# Source lists live in opts.gypi. This makes it easier to maintain our Chrome GYP/GN setup.
|
|
|
|
# (To be honest, I'm not sure why we need to include common.gypi. I thought it was automatic.)
|
|
|
|
'variables': {
|
|
|
|
'includes': [ 'common.gypi', 'opts.gypi' ],
|
|
|
|
},
|
|
|
|
|
|
|
|
# Generally we shove things into one 'opts' target conditioned on platform.
|
|
|
|
# If a particular platform needs some files built with different flags,
|
|
|
|
# those become separate targets: opts_ssse3, opts_sse41, opts_neon.
|
2015-01-27 02:15:31 +00:00
|
|
|
|
2015-01-27 02:55:58 +00:00
|
|
|
'targets': [
|
2011-05-31 13:50:51 +00:00
|
|
|
{
|
|
|
|
'target_name': 'opts',
|
2012-10-10 19:45:51 +00:00
|
|
|
'product_name': 'skia_opts',
|
2011-05-31 13:50:51 +00:00
|
|
|
'type': 'static_library',
|
2012-10-10 19:45:51 +00:00
|
|
|
'standalone_static_library': 1,
|
2013-07-22 14:39:45 +00:00
|
|
|
'dependencies': [
|
|
|
|
'core.gyp:*',
|
2014-01-24 15:43:50 +00:00
|
|
|
'effects.gyp:*'
|
2013-07-22 14:39:45 +00:00
|
|
|
],
|
2011-05-31 13:50:51 +00:00
|
|
|
'include_dirs': [
|
2015-07-28 15:55:14 +00:00
|
|
|
'../include/private',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/core',
|
2012-01-09 14:38:25 +00:00
|
|
|
'../src/opts',
|
2014-07-14 19:00:04 +00:00
|
|
|
'../src/utils',
|
2015-01-27 02:55:58 +00:00
|
|
|
'../include/utils',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'conditions': [
|
2015-02-12 18:48:25 +00:00
|
|
|
[ '"x86" in skia_arch_type and skia_os != "ios"', {
|
2015-01-27 02:55:58 +00:00
|
|
|
'cflags': [ '-msse2' ],
|
2015-08-24 17:32:02 +00:00
|
|
|
'dependencies': [ 'opts_ssse3', 'opts_sse41', 'opts_sse42', 'opts_avx', 'opts_avx2' ],
|
2015-01-27 02:55:58 +00:00
|
|
|
'sources': [ '<@(sse2_sources)' ],
|
|
|
|
}],
|
|
|
|
|
|
|
|
[ 'skia_arch_type == "mips"', {
|
2012-02-14 18:28:54 +00:00
|
|
|
'conditions': [
|
2015-01-27 02:55:58 +00:00
|
|
|
[ '(mips_arch_variant == "mips32r2") and (mips_dsp == 1 or mips_dsp == 2)', {
|
|
|
|
'sources': [ '<@(mips_dsp_sources)' ],
|
|
|
|
},{
|
|
|
|
'sources': [ '<@(none_sources)' ],
|
2012-02-14 18:28:54 +00:00
|
|
|
}],
|
2015-01-27 02:55:58 +00:00
|
|
|
]
|
2015-01-27 02:05:37 +00:00
|
|
|
}],
|
2015-01-27 02:55:58 +00:00
|
|
|
|
|
|
|
[ '(skia_arch_type == "arm" and arm_version < 7) \
|
2015-04-17 21:02:40 +00:00
|
|
|
or (skia_os == "ios") \
|
2015-02-12 18:48:25 +00:00
|
|
|
or (skia_os == "android" \
|
2015-04-17 21:02:40 +00:00
|
|
|
and skia_arch_type not in ["x86", "x86_64", "arm", "mips", \
|
|
|
|
"arm64"])', {
|
2015-01-27 02:55:58 +00:00
|
|
|
'sources': [ '<@(none_sources)' ],
|
|
|
|
}],
|
|
|
|
|
2013-07-31 12:57:27 +00:00
|
|
|
[ 'skia_arch_type == "arm" and arm_version >= 7', {
|
2011-11-03 13:08:29 +00:00
|
|
|
# The assembly uses the frame pointer register (r7 in Thumb/r11 in
|
|
|
|
# ARM), the compiler doesn't like that.
|
2015-01-27 02:55:58 +00:00
|
|
|
'cflags!': [ '-fno-omit-frame-pointer', '-mapcs-frame', '-mapcs' ],
|
|
|
|
'cflags': [ '-fomit-frame-pointer' ],
|
|
|
|
'variables': { 'arm_neon_optional%': '<(arm_neon_optional>' },
|
|
|
|
'sources': [ '<@(armv7_sources)' ],
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'arm_neon == 1 or arm_neon_optional == 1', {
|
2015-01-27 02:55:58 +00:00
|
|
|
'dependencies': [ 'opts_neon' ]
|
2012-09-20 15:45:41 +00:00
|
|
|
}],
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
],
|
2011-11-03 13:08:29 +00:00
|
|
|
}],
|
2015-01-27 02:55:58 +00:00
|
|
|
|
|
|
|
[ 'skia_arch_type == "arm64"', {
|
|
|
|
'sources': [ '<@(arm64_sources)' ],
|
2011-11-03 13:08:29 +00:00
|
|
|
}],
|
2015-01-27 02:55:58 +00:00
|
|
|
|
2014-02-28 16:07:39 +00:00
|
|
|
[ 'skia_android_framework', {
|
|
|
|
'cflags!': [
|
|
|
|
'-msse2',
|
|
|
|
'-mfpu=neon',
|
|
|
|
'-fomit-frame-pointer',
|
|
|
|
]
|
|
|
|
}],
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
},
|
2012-02-14 18:28:54 +00:00
|
|
|
{
|
|
|
|
'target_name': 'opts_ssse3',
|
2012-10-10 19:45:51 +00:00
|
|
|
'product_name': 'skia_opts_ssse3',
|
2012-02-14 18:28:54 +00:00
|
|
|
'type': 'static_library',
|
2012-10-10 19:45:51 +00:00
|
|
|
'standalone_static_library': 1,
|
2015-01-27 02:55:58 +00:00
|
|
|
'dependencies': [ 'core.gyp:*' ],
|
2015-07-28 15:55:14 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../include/private',
|
|
|
|
'../src/core',
|
2015-08-06 15:17:16 +00:00
|
|
|
'../src/utils',
|
2015-07-28 15:55:14 +00:00
|
|
|
],
|
2015-01-27 02:55:58 +00:00
|
|
|
'sources': [ '<@(ssse3_sources)' ],
|
2012-02-14 18:28:54 +00:00
|
|
|
'conditions': [
|
2015-08-25 13:30:07 +00:00
|
|
|
[ 'skia_os == "win"', { 'defines' : [ 'SK_CPU_SSE_LEVEL=31' ] }],
|
|
|
|
[ 'not skia_android_framework', { 'cflags': [ '-mssse3' ] }],
|
2012-02-14 18:28:54 +00:00
|
|
|
],
|
|
|
|
},
|
2014-06-27 15:03:17 +00:00
|
|
|
{
|
2015-01-27 02:55:58 +00:00
|
|
|
'target_name': 'opts_sse41',
|
|
|
|
'product_name': 'skia_opts_sse41',
|
2014-06-27 15:03:17 +00:00
|
|
|
'type': 'static_library',
|
|
|
|
'standalone_static_library': 1,
|
2015-01-27 02:55:58 +00:00
|
|
|
'dependencies': [ 'core.gyp:*' ],
|
2015-07-28 15:55:14 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../include/private',
|
|
|
|
'../src/core',
|
2015-08-06 15:17:16 +00:00
|
|
|
'../src/utils',
|
2015-07-28 15:55:14 +00:00
|
|
|
],
|
2015-01-27 02:55:58 +00:00
|
|
|
'sources': [ '<@(sse41_sources)' ],
|
2015-08-25 13:30:07 +00:00
|
|
|
'xcode_settings': { 'GCC_ENABLE_SSE41_EXTENSIONS': 'YES' },
|
2014-06-27 15:03:17 +00:00
|
|
|
'conditions': [
|
2015-08-25 13:30:07 +00:00
|
|
|
[ 'skia_os == "win"', { 'defines' : [ 'SK_CPU_SSE_LEVEL=41' ] }],
|
|
|
|
[ 'not skia_android_framework', { 'cflags': [ '-msse4.1' ] }],
|
2014-06-27 15:03:17 +00:00
|
|
|
],
|
|
|
|
},
|
2015-08-24 17:32:02 +00:00
|
|
|
{
|
|
|
|
'target_name': 'opts_sse42',
|
|
|
|
'product_name': 'skia_opts_sse42',
|
|
|
|
'type': 'static_library',
|
|
|
|
'standalone_static_library': 1,
|
|
|
|
'dependencies': [ 'core.gyp:*' ],
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/private',
|
|
|
|
'../src/core',
|
|
|
|
'../src/utils',
|
|
|
|
],
|
|
|
|
'sources': [ '<@(sse42_sources)' ],
|
2015-08-25 13:30:07 +00:00
|
|
|
'xcode_settings': { 'GCC_ENABLE_SSE42_EXTENSIONS': 'YES' },
|
2015-08-24 17:32:02 +00:00
|
|
|
'conditions': [
|
2015-08-25 13:30:07 +00:00
|
|
|
[ 'skia_os == "win"', { 'defines' : [ 'SK_CPU_SSE_LEVEL=42' ] }],
|
|
|
|
[ 'not skia_android_framework', { 'cflags': [ '-msse4.2' ] }],
|
2015-08-24 17:32:02 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'opts_avx',
|
|
|
|
'product_name': 'skia_opts_avx',
|
|
|
|
'type': 'static_library',
|
|
|
|
'standalone_static_library': 1,
|
|
|
|
'dependencies': [ 'core.gyp:*' ],
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/private',
|
|
|
|
'../src/core',
|
|
|
|
'../src/utils',
|
|
|
|
],
|
|
|
|
'sources': [ '<@(avx_sources)' ],
|
2015-08-25 13:30:07 +00:00
|
|
|
'msvs_settings': { 'VCCLCompilerTool': { 'EnableEnhancedInstructionSet': '3' } },
|
|
|
|
'xcode_settings': { 'OTHER_CFLAGS': [ '-mavx' ] },
|
2015-08-24 17:32:02 +00:00
|
|
|
'conditions': [
|
2015-08-25 13:30:07 +00:00
|
|
|
[ 'not skia_android_framework', { 'cflags': [ '-mavx' ] }],
|
2015-08-24 17:32:02 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'opts_avx2',
|
|
|
|
'product_name': 'skia_opts_avx2',
|
|
|
|
'type': 'static_library',
|
|
|
|
'standalone_static_library': 1,
|
|
|
|
'dependencies': [ 'core.gyp:*' ],
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/private',
|
|
|
|
'../src/core',
|
|
|
|
'../src/utils',
|
|
|
|
],
|
|
|
|
'sources': [ '<@(avx2_sources)' ],
|
2015-08-25 13:30:07 +00:00
|
|
|
'msvs_settings': { 'VCCLCompilerTool': { 'EnableEnhancedInstructionSet': '5' } },
|
|
|
|
'xcode_settings': { 'OTHER_CFLAGS': [ '-mavx2' ] },
|
2015-08-24 17:32:02 +00:00
|
|
|
'conditions': [
|
2015-08-25 13:30:07 +00:00
|
|
|
[ 'not skia_android_framework', { 'cflags': [ '-mavx2' ] }],
|
2015-08-24 17:32:02 +00:00
|
|
|
],
|
|
|
|
},
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
{
|
|
|
|
'target_name': 'opts_neon',
|
2012-10-10 19:45:51 +00:00
|
|
|
'product_name': 'skia_opts_neon',
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
'type': 'static_library',
|
2012-10-10 19:45:51 +00:00
|
|
|
'standalone_static_library': 1,
|
2013-07-22 14:39:45 +00:00
|
|
|
'dependencies': [
|
|
|
|
'core.gyp:*',
|
2014-01-24 15:43:50 +00:00
|
|
|
'effects.gyp:*'
|
2013-07-22 14:39:45 +00:00
|
|
|
],
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
'include_dirs': [
|
2015-07-28 15:55:14 +00:00
|
|
|
'../include/private',
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
'../src/core',
|
2012-08-01 14:25:07 +00:00
|
|
|
'../src/opts',
|
2014-07-14 19:00:04 +00:00
|
|
|
'../src/utils',
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
],
|
2015-01-27 02:55:58 +00:00
|
|
|
'sources': [ '<@(neon_sources)' ],
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
'cflags!': [
|
|
|
|
'-fno-omit-frame-pointer',
|
|
|
|
'-mfpu=vfp', # remove them all, just in case.
|
|
|
|
'-mfpu=vfpv3',
|
|
|
|
'-mfpu=vfpv3-d16',
|
|
|
|
],
|
2014-02-28 16:07:39 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'not skia_android_framework', {
|
|
|
|
'cflags': [
|
|
|
|
'-mfpu=neon',
|
|
|
|
'-fomit-frame-pointer',
|
|
|
|
],
|
|
|
|
}],
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
],
|
2013-01-23 18:56:38 +00:00
|
|
|
'ldflags': [
|
|
|
|
'-march=armv7-a',
|
|
|
|
'-Wl,--fix-cortex-a8',
|
|
|
|
],
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
},
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
}
|