From 479758aeb15c82c8faf6d7a905999c7512284c64 Mon Sep 17 00:00:00 2001 From: Jin Bo Date: Tue, 6 Jul 2021 17:18:48 +0800 Subject: libvpx[loongarch]: Add loongarch support. LSX and LASX are enabled by default if compiler supports them. Bug: webm:1754 Change-Id: Ic36b113bc4313c50e9d2bbab91199b3aa46d00dc --- build/make/rtcd.pl | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'build/make/rtcd.pl') diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl index acb9f6e46..8ed776add 100755 --- a/build/make/rtcd.pl +++ b/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 <) { + if (/HAVE_LSX=yes/) { + @ALL_ARCHS = filter("$opts{arch}", qw/lsx/); + last; + } + if (/HAVE_LASX=yes/) { + @ALL_ARCHS = filter("$opts{arch}", qw/lasx/); + last; + } + } + close CONFIG_FILE; + loongarch; } else { unoptimized; } -- cgit v1.2.3