Add MIPS SIMD Arch (MSA) build flags for GYP/GN builds
A preparation patch for adding MSA optimizations in libYUV project. Review-Url: https://codereview.chromium.org/2150943003 Cr-Original-Commit-Position: refs/heads/master@{#413302} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 953e9fa0192b566ce280d895cbc3db2924c7e239
This commit is contained in:
Родитель
45f1f694ad
Коммит
38a9cfaa10
11
common.gypi
11
common.gypi
|
@ -217,6 +217,9 @@
|
|||
# 2: revision 2
|
||||
'mips_dsp_rev%': 0,
|
||||
|
||||
# MIPS SIMD Arch compilation flag.
|
||||
'mips_msa%': 1,
|
||||
|
||||
'conditions': [
|
||||
['branding == "Chrome"', {
|
||||
'branding_path_component%': 'google_chrome',
|
||||
|
@ -340,6 +343,7 @@
|
|||
'target_subarch%': '<(target_subarch)',
|
||||
'mips_arch_variant%': '<(mips_arch_variant)',
|
||||
'mips_dsp_rev%': '<(mips_dsp_rev)',
|
||||
'mips_msa%': '<(mips_msa)',
|
||||
'toolkit_views%': '<(toolkit_views)',
|
||||
'desktop_linux%': '<(desktop_linux)',
|
||||
'use_aura%': '<(use_aura)',
|
||||
|
@ -1120,6 +1124,7 @@
|
|||
'target_subarch%': '<(target_subarch)',
|
||||
'mips_arch_variant%': '<(mips_arch_variant)',
|
||||
'mips_dsp_rev%': '<(mips_dsp_rev)',
|
||||
'mips_msa%': '<(mips_msa)',
|
||||
'host_arch%': '<(host_arch)',
|
||||
'toolkit_views%': '<(toolkit_views)',
|
||||
'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
|
||||
|
@ -4119,6 +4124,9 @@
|
|||
['clang==0 and OS=="android"', {
|
||||
'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',],
|
||||
}],
|
||||
['mips_msa==1', {
|
||||
'cflags': ['-mmsa', '-mfp64', '-msched-weight', '-mload-store-pairs'],
|
||||
}],
|
||||
],
|
||||
'cflags': [ '-mfp64', '-mno-odd-spreg' ],
|
||||
'ldflags': [ '-mfp64', '-mno-odd-spreg' ],
|
||||
|
@ -4225,6 +4233,9 @@
|
|||
'cflags': ['-mips64r6', '-Wa,-mips64r6'],
|
||||
'ldflags': ['-mips64r6'],
|
||||
}],
|
||||
['mips_msa==1', {
|
||||
'cflags': ['-mmsa', '-mfp64', '-msched-weight', '-mload-store-pairs'],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['mips_arch_variant=="r2"', {
|
||||
|
|
|
@ -561,6 +561,14 @@ config("compiler_cpu_abi") {
|
|||
]
|
||||
}
|
||||
}
|
||||
if (mips_use_msa == true) {
|
||||
cflags += [
|
||||
"-mmsa",
|
||||
"-mfp64",
|
||||
"-msched-weight",
|
||||
"-mload-store-pairs",
|
||||
]
|
||||
}
|
||||
} else if (mips_arch_variant == "r2") {
|
||||
if (is_clang) {
|
||||
if (is_android) {
|
||||
|
@ -637,6 +645,14 @@ config("compiler_cpu_abi") {
|
|||
]
|
||||
ldflags += [ "-mips64r6" ]
|
||||
}
|
||||
if (mips_use_msa == true) {
|
||||
cflags += [
|
||||
"-mmsa",
|
||||
"-mfp64",
|
||||
"-msched-weight",
|
||||
"-mload-store-pairs",
|
||||
]
|
||||
}
|
||||
} else if (mips_arch_variant == "r2") {
|
||||
cflags += [
|
||||
"-mips64r2",
|
||||
|
|
|
@ -22,6 +22,9 @@ if (current_cpu == "mipsel" || v8_current_cpu == "mipsel") {
|
|||
# 2: revision 2
|
||||
mips_dsp_rev = 0
|
||||
|
||||
# MIPS SIMD Arch compilation flag.
|
||||
mips_use_msa = true
|
||||
|
||||
# MIPS floating-point ABI. Possible values are:
|
||||
# "hard": sets the GCC -mhard-float option.
|
||||
# "soft": sets the GCC -msoft-float option.
|
||||
|
@ -40,6 +43,9 @@ if (current_cpu == "mipsel" || v8_current_cpu == "mipsel") {
|
|||
if (current_os == "android" || target_os == "android") {
|
||||
declare_args() {
|
||||
mips_arch_variant = "r6"
|
||||
|
||||
# MIPS SIMD Arch compilation flag.
|
||||
mips_use_msa = true
|
||||
}
|
||||
} else {
|
||||
declare_args() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче