From patchwork Fri Sep 9 15:48:48 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: 37803 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp998477pzh; Fri, 9 Sep 2022 08:51:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR6lM2qnqaS81c5G71ZnmjqbMFNI1oJChLCbcKDVeyPt5xZJUewcFDYP4IYKtelqbWAU2TsY X-Received: by 2002:a17:907:78b:b0:741:3d29:33d2 with SMTP id xd11-20020a170907078b00b007413d2933d2mr10580885ejb.103.1662738660635; Fri, 09 Sep 2022 08:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662738660; cv=none; d=google.com; s=arc-20160816; b=exPnzKnuEnJBOdVXNA9w4KdTbCZx+pkRtppjvEn1qFp2AxkbEZPEt9mwQwLe0g5TE4 gmf+uo0kcbGxyzlVkNNp6HwK5nPPshBuYTn/dDII3T81hN2gr8xI3TgEb8J9lN9/i2JW XtodRkD0RFmJH6Rt++rCxcRUiaruwhtPRL6TcdwYl6Hef5s1F8Ukwla6OwIMgtV+2JB5 PVPlH/g6qwnDQvGo6eqva+v3wnHEadKw43DlxJxUtdvu4YxEp3LPiCkz3jKZMngzuHPf 5Elqs1OZcsOOpD9SO6j6vmNjqe8oPzAg97gvDaXlXxDfvAh9xN5TFdmor+04raunC12R 7Afg== 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=eaEou0KQyOFm/1LpkQQhDLfhyGIV6wIp/FCAO/Z/+CM=; b=Tm1XBia+RBMuJmsxHOkOO02PKw/LZjifnGpjPI0meMYu8U0AVhPsEtHbnIJ3pELLKU Qfr6VlD+SV9eoZPBzEDGkhHaTqWwjuTyWqeu9IYeGC8dNivirE93t9DhzO+7FK7j3F75 Iuco8bxW0xS13LHIAGlrxJbqjsDGELVa0s2xg6QmeZ1cwXsMsFPYPmgOHfh4vGdlytyp LJu9KP7u88ALWoDFppK/zfJA1wfNONn9w+UaW7WBrqEJohLaX1N8JahKY4EUNXPwXwVK EVHJeHKkwmPRWVUXsWSoR7Ykdt/a7Ho62sUdcBmBcDZ/bFhgPvaiO8OUeE/+pmfaarTT T+dg== 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 ju9-20020a17090798a900b0073d92f673f8si610709ejc.937.2022.09.09.08.50.59; Fri, 09 Sep 2022 08:51:00 -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 53A2268BB8D; Fri, 9 Sep 2022 18:49:19 +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 3DE7868BB4C for ; Fri, 9 Sep 2022 18:49:05 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 719ADC00B3 for ; Fri, 9 Sep 2022 18:49:00 +0300 (EEST) From: remi@remlab.net To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Sep 2022 18:48:48 +0300 Message-Id: <20220909154859.68954-7-remi@remlab.net> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/18] 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: xV9On5OUXXk2 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