From patchwork Mon Jul 22 18:44:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= X-Patchwork-Id: 50682 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a742:0:b0:482:c625:d099 with SMTP id f2csp2197929vqm; Mon, 22 Jul 2024 11:44:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCURk0CPQMNm/fNJs0t7spfOLdSiC/QBb3sN02lN4B88nWBYNaxpVthBdz62gzRVz2oB0OD9FPXRAJnrVSt8sE11xtOjfpZ9aUlgGg== X-Google-Smtp-Source: AGHT+IEcoFJgp35jHm9/rseFLPsS7Vdyiua9nrFSr/NY81JcQNmHay65UltpgRAhBKUpUvMW8QC7 X-Received: by 2002:a17:907:944b:b0:a77:eb34:3b42 with SMTP id a640c23a62f3a-a7a4bfbb653mr600309966b.12.1721673882899; Mon, 22 Jul 2024 11:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721673882; cv=none; d=google.com; s=arc-20160816; b=pcW8c3AWi4evyiXS0brQy97n40P4whYafbjeVSrPexNrMJnsFqfwKKfEr5LKB6Sn+d jexXspynhLgTMCOILzYVqqVcvLEWdlftpJkrXu2Kn1tiKC1PnIKlZGcCrh+SU9s6rG5C Rr51GtFrl48GQ+udgKcBJvjUv2N9b03oAJPCkr+w48DHV7PH0XQmvib8ObYDmjCVNkXR fCPgDa/zQm8Hc8ZMTqIlQHfcJiusoswhtVBDPAP0HHW3xwdJeizNVjKLh87nySi6BGl4 RICC0f4INHr9LgjiNBpT+L7qiRF4j6u1ba9Pkwk6E2xfwz2G3T2i4kJ7IgOKzEZuQPUC WjAQ== 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:message-id:date:to:from :delivered-to; bh=A6wvj9XmpVBrRCUz5R0NIHLuq3TLbQFvfnD0MtWNFkY=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=lU+zLiyDnpkNIQPblmpK4PVtMqdIB5ss2eDJGovDKA5FaZT4x0pgoj94xaBtUcWSal VyNWxlPWOThhplR4AWFfUSfEdm19jJmJxxXyC0Avn+1UiTbKaQ491KiACtRHH29laLxI xZ2ScnoSujBW8j8qICw1U6qQEN69LLse3NcahKSpuTlX5lWUI7ynUiMl4u8psvBEQeql rt8tACK1tvgffF12AsBidVL0CYYEAMl5SzzuVinyf4UdZCUgnB9ZCAAX/SSW28aASDE9 F7Kq6rTjX6cQnabhbT8ZJ5VbfLH9wXkWHKVnoD/B8FUW4jWgDdAAmhJyvl04oKwdMChv mcwA==; dara=google.com 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 a640c23a62f3a-a7a3c926bf6si442768666b.643.2024.07.22.11.44.42; Mon, 22 Jul 2024 11:44:42 -0700 (PDT) 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 C0D5268D58F; Mon, 22 Jul 2024 21:44:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 288AD68D07E for ; Mon, 22 Jul 2024 21:44:32 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id C1E5BC0069 for ; Mon, 22 Jul 2024 21:44:31 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Jul 2024 21:44:20 +0300 Message-ID: <20240722184431.40853-1-remi@remlab.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/9] lavu/riscv: allow any number of extensions 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: OMEgexD0xiQw This reworks the func/endfunc macros to support any number of ISA extension as parameters. --- libavutil/riscv/asm.S | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libavutil/riscv/asm.S b/libavutil/riscv/asm.S index 2cf4f7b7ab..78e9defbd4 100644 --- a/libavutil/riscv/asm.S +++ b/libavutil/riscv/asm.S @@ -36,17 +36,18 @@ #define HWD #endif - .macro func sym, ext1=, ext2= + .macro archadd ext=, more:vararg + .ifnb \ext + .option arch, +\ext + archadd \more + .endif + .endm + + .macro func sym, exts:vararg .text .align 2 - .option push - .ifnb \ext1 - .option arch, +\ext1 - .ifnb \ext2 - .option arch, +\ext2 - .endif - .endif + archadd \exts .global \sym .hidden \sym