diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-08-08 12:06:17 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-08-08 12:06:17 +0000 |
commit | d6f23fa1d6d08bf56584be7689b9560a242e22fa (patch) | |
tree | 6e0cca478f6f9e96e806f4af167201155c0a30a8 /libvpx/build/make/rtcd.pl | |
parent | 0e4073417f6db7af294f1af0c5bc45c384c51b8f (diff) | |
parent | 6939824c0cf8321a1718973892371085f7b4edff (diff) | |
download | libvpx-android13-mainline-wifi-release.tar.gz |
Snap for 8917908 from 6939824c0cf8321a1718973892371085f7b4edff to mainline-wifi-releaseaml_wif_331810010aml_wif_331710030aml_wif_331613000aml_wif_331511020aml_wif_331414000aml_wif_331310070aml_wif_331112000aml_wif_331016070android13-mainline-wifi-release
Change-Id: I7d6734d12edd22ecfbec51f472ce6e08422b2595
Diffstat (limited to 'libvpx/build/make/rtcd.pl')
-rwxr-xr-x | libvpx/build/make/rtcd.pl | 34 |
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; } |