From patchwork Sat Sep 17 12:45:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= X-Patchwork-Id: 37982 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp191679pzh; Sat, 17 Sep 2022 05:46:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM77KcI1vBG0hrVIoxVHN2SorYBBguj9Q/lWKmkobWQXwojsK02XyxFsxL22rFVTBpyUm+8k X-Received: by 2002:a17:907:7621:b0:741:6656:bd14 with SMTP id jy1-20020a170907762100b007416656bd14mr6563644ejc.298.1663418780255; Sat, 17 Sep 2022 05:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663418780; cv=none; d=google.com; s=arc-20160816; b=TUzJSodaPFqePdNVCkzycq9OK/O9ab6psE1Z/L/dFnEnuRJ/UX7gYjkXm6nXo5Vn5R 282qR9ntKp+eqdRa/z+ju95f0slf3puY9cTfEZgRcjpY8eh5xCLxnkIsejBGYER5rNB3 IG1ApkoKrRn2GVxfYpcu5astinB6Pv+Rpvl6ilyfiAdyqTpvBU9RRBYoDxJqLz0f2Gma MwS5g96TqTFEz0g7OIOUG/7MIuCN8tcSJUaa9WK6ApNJGCQf24PQ52FEd1f6OfbcdvTI 7+Flux2JVj3NL390uBVdIJQmOUt22vLxpm4zKECNnYv4BjShqNkFgAyhuF8lO6WLDVX4 Nk5w== 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=eaEou0KQyOFm/1LpkQQhDLfhyGIV6wIp/FCAO/Z/+CM=; b=QAOIFH/MtqQh5EPJ87TrpZYRNGl0RRLnP1eE3emYowcGxYs1gLO03gO34IlLlWMoj4 moTpeIwBQSJi4cCplEOHZR466Hu6v+VQDjkE47alserxepUcZtlCmPiHg5S/WjXTeNr8 6NHDEVx5UG4kpgIRDtskNi6ZNPCnW2eRH8J9v2lw5xLauP0GdgJOnkiU/BDKt2CypQVB AdMpuanH5PU3XbtOfuS72T8laxvts5v/m+IiMSzIXV87cU8LvlmRWB0jCphTed6jYzS/ o4BRt1g6e/Yky9T2NhjZIyYAR/gjEzAL+l4wIsvhERStLrYKrFfw1Adi7heAg95/7tI3 fEDg== 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 z18-20020a05640240d200b0045161c9a31fsi5496688edb.69.2022.09.17.05.46.19; Sat, 17 Sep 2022 05:46:20 -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 743F968BC13; Sat, 17 Sep 2022 15:45:48 +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 1145868BBCC for ; Sat, 17 Sep 2022 15:45:38 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id C29A0C00B0 for ; Sat, 17 Sep 2022 15:45:37 +0300 (EEST) From: remi@remlab.net To: ffmpeg-devel@ffmpeg.org Date: Sat, 17 Sep 2022 15:45:35 +0300 Message-Id: <20220917124537.66238-4-remi@remlab.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: <5602047.DvuYhMxLoT@basile.remlab.net> References: <5602047.DvuYhMxLoT@basile.remlab.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/6] lavu/riscv: initial common header for assembler macros 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: B5DryPOHs53x From: RĂ©mi Denis-Courmont --- libavutil/riscv/asm.S | 74 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 libavutil/riscv/asm.S diff --git a/libavutil/riscv/asm.S b/libavutil/riscv/asm.S new file mode 100644 index 0000000000..7623c161cf --- /dev/null +++ b/libavutil/riscv/asm.S @@ -0,0 +1,74 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" + +#if defined (__riscv_float_abi_soft) +#define NOHWF +#define NOHWD +#define HWF # +#define HWD # +#elif defined (__riscv_float_abi_single) +#define NOHWF # +#define NOHWD +#define HWF +#define HWD # +#else +#define NOHWF # +#define NOHWD # +#define HWF +#define HWD +#endif + + .macro func sym, ext= + .text + .align 2 + + .option push + .ifnb \ext + .option arch, +\ext + .endif + + .global \sym + .hidden \sym + .type \sym, %function + \sym: + + .macro endfunc + .size \sym, . - \sym + .option pop + .previous + .purgem endfunc + .endm + .endm + + .macro const sym, align=3, relocate=0 + .if \relocate + .pushsection .data.rel.ro + .else + .pushsection .rodata + .endif + .align \align + \sym: + + .macro endconst + .size \sym, . - \sym + .popsection + .purgem endconst + .endm + .endm