From patchwork Wed Dec 1 03:52:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyou Yin X-Patchwork-Id: 31858 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp8672838iob; Tue, 30 Nov 2021 19:52:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVtmXb0BwNlzL/9bcm3Gvwg2fW/32ZrLoT+RzAFGhUFRFaYwciqKiz0H/VCf/PB4BdIFyZ X-Received: by 2002:a17:906:794e:: with SMTP id l14mr4164938ejo.64.1638330778944; Tue, 30 Nov 2021 19:52:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638330778; cv=none; d=google.com; s=arc-20160816; b=Z6N1UnQIli5ZZU1OSHQT9eaD5eg+devNg4yjfpoKyFCwmihBDsbZeyexhthjNVd2vB r19vikQGp34QmXHhmYlZ2z85LK5WEEuu1sAKB44uxmGY8dO4R5iynRQoW6sO2acW24eJ dqI/CAfxOpPiouCDLar7q/Dyw1B37PWnxgb5hh7dTDg7x1P7Wi7wedlLkyLuixroZZ6Z /da14wUNhCugdL4hWroleW2+LrqOsyK8HvsAyep46dTTS/+Vj+F2TG3VEZvyKDxKS5/u jR7om1EIPOs+lX1rKvYEhDzxaiwfQEmP3lUga16QHqGmJ9h+CdukZodBlBSiZRqLzTgr sB8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=m5x+4hBXXxfJ8vx+ecTcdDumjWVqPsrjtD4mZVCIL/Y=; b=uMMnmNtWomLaWiWn26dJl/ZvV4YxAT/9XF1GOJQTLreDx64oVCI8+jy0vhMn2WkEwN fmsYGKowqKLtWawvcF6bqSEBCxvl8bBuwiGEwYdXVvQTyuZ0r65mZYZPAHxxHVshqZBh BPLXbiYet0GU5XaAg571VqFQXg0YDuFEeKsq35bCovB70Huxhx6ZTX5bIrgoEx1Cltp3 2a+J8hwgOeoYlBXux4g4O7SmSWBO8Ni2Yq7l8PDYQPA8YNNyPyUD+tYeEIagTehs8y+D v1y1jtZ9xYsAoQFviDMjBPllQO4GccJlwdBgRpuCuRPe2F84u07t8XFuhH59Eg5c31dU cQNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d11si30192921edn.463.2021.11.30.19.52.58; Tue, 30 Nov 2021 19:52:58 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 55FC768AE71; Wed, 1 Dec 2021 05:52:39 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9437668A2D8 for ; Wed, 1 Dec 2021 05:52:28 +0200 (EET) Received: from localhost (unknown [36.33.26.144]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dx78p58aZh8_ABAA--.4785S3; Wed, 01 Dec 2021 11:52:25 +0800 (CST) From: Shiyou Yin To: ffmpeg-devel@ffmpeg.org Date: Wed, 1 Dec 2021 11:52:19 +0800 Message-Id: <20211201035221.18817-2-yinshiyou-hf@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211201035221.18817-1-yinshiyou-hf@loongson.cn> References: <20211201035221.18817-1-yinshiyou-hf@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf9Dx78p58aZh8_ABAA--.4785S3 X-Coremail-Antispam: 1UD129KBjvJXoW7AFyrKFy8ur1kGry8Jw4rGrg_yoW8Wry5pr 97ZrWfKr48JryfGFsIqas5WFn8JrZ7WFy2qF13Kw1rCa1UAryDZr18GFyqgF1DXan8Cr4Y qr4rG3WUuF4UAFUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkYb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwV C2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC 0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUAVWUtwAv7VC2z280aVAFwI0_Gr0_Cr 1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxkIecxEwVAFwVW8GwCF04k2 0xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI 8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jr0_JrylIxkGc2Ij64vIr41l IxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIx AIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2 jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IUY83ktUUUUU== X-CM-SenderInfo: p1lq2x5l1r3gtki6z05rqj20fqof0/ Subject: [FFmpeg-devel] [PATCH v2 1/3] configure: Add support for loongarch. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: xGlnfTrR57n3 For la464 cpu: ./configure --cpu=la464 With cross-compiler: ./configure --cross-prefix=loongarch64-linux-gnu- \ --enable-cross-compile --arch=loongarch64 \ --target-os=linux --cpu=la464 --- Changelog | 1 + configure | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Changelog b/Changelog index 56faa7f9f5..648079ab64 100644 --- a/Changelog +++ b/Changelog @@ -35,6 +35,7 @@ version : - bitpacked encoder - VideoToolbox VP9 hwaccel - VideoToolbox ProRes hwaccel +- support loongarch. version 4.4: diff --git a/configure b/configure index d8b5be8bbb..aa94c39419 100755 --- a/configure +++ b/configure @@ -2032,6 +2032,9 @@ ARCH_LIST=" avr32_uc bfin ia64 + loongarch + loongarch32 + loongarch64 m68k mips mips64 @@ -4959,6 +4962,9 @@ case "$arch" in arm*|iPad*|iPhone*) arch="arm" ;; + loongarch*) + arch="loongarch" + ;; mips*|IP*) case "$arch" in *el) @@ -5106,6 +5112,18 @@ elif enabled bfin; then cpuflags="-mcpu=$cpu" +elif enabled loongarch; then + + enable local_aligned + enable simd_align_32 + enable fast_64bit + enable fast_clz + enable fast_unaligned + case $cpu in + la464) + cpuflags="-march=$cpu" + ;; + esac elif enabled mips; then if [ "$cpu" != "generic" ]; then @@ -5362,6 +5380,11 @@ case "$arch" in aarch64|alpha|ia64) enabled shared && enable_weak pic ;; + loongarch) + check_64bit loongarch32 loongarch64 + enabled loongarch64 && disable loongarch32 + enabled shared && enable_weak pic + ;; mips) check_64bit mips mips64 '_MIPS_SIM > 1' enabled shared && enable_weak pic