Commit 3a57a5be authored by Luca Barbato's avatar Luca Barbato Committed by Tom Finegan

cmake: Support PowerPC

Change-Id: I5c3abbac2fe425dad26231a66b64820832ca02eb
parent a453cb48
......@@ -17,7 +17,7 @@ include(FindThreads)
include(FindwxWidgets)
set(AOM_SUPPORTED_CPU_TARGETS
"arm64 armv7 armv7s generic mips32 mips64 x86 x86_64")
"arm64 armv7 armv7s generic mips32 mips64 ppc x86 x86_64")
# Generate the user config settings. This must occur before include of
# aom_config_defaults.cmake (because it turns every config variable into a cache
......@@ -70,6 +70,8 @@ if (NOT AOM_TARGET_CPU)
set(AOM_TARGET_CPU "${CMAKE_SYSTEM_PROCESSOR}")
elseif ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64")
set(AOM_TARGET_CPU "arm64")
elseif ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^ppc")
set(AOM_TARGET_CPU "ppc")
else ()
message(WARNING "The architecture ${CMAKE_SYSTEM_PROCESSOR} is not "
"supported, falling back to the generic target")
......
......@@ -343,6 +343,27 @@ EOF
common_bottom;
}
sub ppc() {
determine_indirection("c", @ALL_ARCHS);
common_top;
print <<EOF;
#include "aom_config.h"
#ifdef RTCD_C
static void setup_rtcd_internal(void)
{
EOF
set_function_pointers("c", @ALL_ARCHS);
print <<EOF;
}
#endif
EOF
common_bottom;
}
sub unoptimized() {
determine_indirection "c";
common_top;
......@@ -399,6 +420,9 @@ if ($opts{arch} eq 'x86') {
} elsif ($opts{arch} eq 'armv8' || $opts{arch} eq 'arm64' ) {
@ALL_ARCHS = filter(qw/neon/);
arm;
} elsif ($opts{arch} eq 'ppc') {
@ALL_ARCHS = filter(qw/vsx/);
ppc;
} else {
unoptimized;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment