aboutsummaryrefslogtreecommitdiff
path: root/libvpx/build/make/rtcd.pl
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-08-08 12:06:17 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-08-08 12:06:17 +0000
commitd6f23fa1d6d08bf56584be7689b9560a242e22fa (patch)
tree6e0cca478f6f9e96e806f4af167201155c0a30a8 /libvpx/build/make/rtcd.pl
parent0e4073417f6db7af294f1af0c5bc45c384c51b8f (diff)
parent6939824c0cf8321a1718973892371085f7b4edff (diff)
downloadlibvpx-android13-mainline-wifi-release.tar.gz
Change-Id: I7d6734d12edd22ecfbec51f472ce6e08422b2595
Diffstat (limited to 'libvpx/build/make/rtcd.pl')
-rwxr-xr-xlibvpx/build/make/rtcd.pl34
1 files changed, 34 insertions, 0 deletions
diff --git a/libvpx/build/make/rtcd.pl b/libvpx/build/make/rtcd.pl
index acb9f6e46..9c9726842 100755
--- a/libvpx/build/make/rtcd.pl
+++ b/libvpx/build/make/rtcd.pl
@@ -387,6 +387,37 @@ EOF
common_bottom;
}
+sub loongarch() {
+ determine_indirection("c", @ALL_ARCHS);
+
+ # Assign the helper variable for each enabled extension
+ foreach my $opt (@ALL_ARCHS) {
+ my $opt_uc = uc $opt;
+ eval "\$have_${opt}=\"flags & HAS_${opt_uc}\"";
+ }
+
+ common_top;
+ print <<EOF;
+#include "vpx_config.h"
+
+#ifdef RTCD_C
+#include "vpx_ports/loongarch.h"
+static void setup_rtcd_internal(void)
+{
+ int flags = loongarch_cpu_caps();
+
+ (void)flags;
+EOF
+
+ set_function_pointers("c", @ALL_ARCHS);
+
+ print <<EOF;
+}
+#endif
+EOF
+ common_bottom;
+}
+
sub unoptimized() {
determine_indirection "c";
common_top;
@@ -462,6 +493,9 @@ if ($opts{arch} eq 'x86') {
} elsif ($opts{arch} =~ /^ppc/ ) {
@ALL_ARCHS = filter(qw/vsx/);
ppc;
+} elsif ($opts{arch} =~ /loongarch/ ) {
+ @ALL_ARCHS = filter(qw/lsx lasx/);
+ loongarch;
} else {
unoptimized;
}