From patchwork Tue May 14 19:35:56 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: 48878 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:3a48:b0:1af:fc2d:ff5a with SMTP id zu8csp1172818pzb; Tue, 14 May 2024 12:36:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV5nSxtWYj4nnFed+fG0eGQvKCIhkpa3kyiSIcaBpmFPMivRA29ZGtHZYzhGPZTuGf764A3Ap239DBYrG5mie2qumkRyxkFqqgFjA== X-Google-Smtp-Source: AGHT+IGKPTVZdi1293NJuFzODb9biPbUR92wEZ9fkaCra2krCuEOAaPG7J0TyuJeXvIPeOrwqe+e X-Received: by 2002:a17:906:7196:b0:a55:5ba7:2889 with SMTP id a640c23a62f3a-a5a2d5c9f69mr911931466b.42.1715715379542; Tue, 14 May 2024 12:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715715379; cv=none; d=google.com; s=arc-20160816; b=xCSvC+YjJGnwotqUGQXSQI++zesg4ORXGhx/1qz2KXnQ6cehTkGGDEjmn8m4/pIosK oGe7mL7XFUfLNVsSVRB+0B0Pnr5rlfSTw7mxMtgYQmD3wL1jHRj2iedUgUpuOmdSnnkH nQu9XKFBTh/xXJBH5yZzMR0sjkX5NpeUkIAwYwymcHTHSlvWn17nQYScRbVgqFNF1idm BD8bltdlV+6F9pjfT/TTGZmIxYxCUAzOvbtaj63KoRzgWkR1IWjihqN3KGABwq9Z7crX pSwwqlGfO4HnubEkXRLjIGr3dKFEUuFjpHO+37kbgghqGYpeiQJBYSDaNV8CPGNmT/kX MyWQ== 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=bXZ9oU6ZcFFSCfkeJDvv1hRiDTleT1NvfflK1q8kuBo=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=YEwVPEkUhsYsJqsZ22KyVX6Pkq1nnHxxR8alJ/34kXp2U6MULHOqB8e+cGMqxzXWta 3OTFdImyeEQpsdMA+jwsU9eG3JHMA8qvUQkyWjLbbOxlAAjCny8yRcu7Mv52qym6cJsK JoZSjThSp4Kk0er7LgrvXcZCsPGjtt8bz0T/6CmvfKxzN07NT+IJaW2x67Xu0TCZ9OlZ 0gWwwIg4sMxhH8Z+B/RJ52igB4wUP7YLEJJW2KesPlsqtP1rivRESMVTvnYouKKJdg5O DgcCkAdUEla4SW7nplBu5MOoT6PEYMe71E0ASJMSBiMmB++yLmqop7LOah5cwKrak2q3 /HDQ==; 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-a5a8970ff4asi78990866b.262.2024.05.14.12.36.19; Tue, 14 May 2024 12:36:19 -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 5049368D735; Tue, 14 May 2024 22:36:06 +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 413A468D6DC for ; Tue, 14 May 2024 22:35:58 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 5AF8DC00A2 for ; Tue, 14 May 2024 22:35:57 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 14 May 2024 22:35:56 +0300 Message-ID: <20240514193557.32759-1-remi@remlab.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] lavu/riscv: assembler macros for VTYPE fields 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: zSJBe9hExa6H --- libavutil/riscv/asm.S | 48 +++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/libavutil/riscv/asm.S b/libavutil/riscv/asm.S index 14be5055f5..ecf3081e61 100644 --- a/libavutil/riscv/asm.S +++ b/libavutil/riscv/asm.S @@ -96,20 +96,38 @@ .endm #endif +#define VTYPE_E8 000 +#define VTYPE_E16 010 +#define VTYPE_E32 020 +#define VTYPE_E64 030 + +#define VTYPE_MF8 05 +#define VTYPE_MF4 06 +#define VTYPE_MF2 07 +#define VTYPE_M1 00 +#define VTYPE_M2 01 +#define VTYPE_M4 02 +#define VTYPE_M8 03 + +#define VTYPE_TU 0000 +#define VTYPE_TA 0100 +#define VTYPE_MU 0000 +#define VTYPE_MA 0200 + /* Convenience macro to load a Vector type (vtype) as immediate */ .macro lvtypei rd, e, m=m1, tp=tu, mp=mu .ifc \e,e8 - .equ ei, 0 + .equ ei, VTYPE_E8 .else .ifc \e,e16 - .equ ei, 8 + .equ ei, VTYPE_E16 .else .ifc \e,e32 - .equ ei, 16 + .equ ei, VTYPE_E32 .else .ifc \e,e64 - .equ ei, 24 + .equ ei, VTYPE_E64 .else .error "Unknown element type" .endif @@ -118,25 +136,25 @@ .endif .ifc \m,m1 - .equ mi, 0 + .equ mi, VTYPE_M1 .else .ifc \m,m2 - .equ mi, 1 + .equ mi, VTYPE_M2 .else .ifc \m,m4 - .equ mi, 2 + .equ mi, VTYPE_M4 .else .ifc \m,m8 - .equ mi, 3 + .equ mi, VTYPE_M8 .else .ifc \m,mf8 - .equ mi, 5 + .equ mi, VTYPE_MF8 .else .ifc \m,mf4 - .equ mi, 6 + .equ mi, VTYPE_MF4 .else .ifc \m,mf2 - .equ mi, 7 + .equ mi, VTYPE_MF2 .else .error "Unknown multiplier" .equ mi, 3 @@ -149,20 +167,20 @@ .endif .ifc \tp,tu - .equ tpi, 0 + .equ tpi, VTYPE_TU .else .ifc \tp,ta - .equ tpi, 64 + .equ tpi, VTYPE_TA .else .error "Unknown tail policy" .endif .endif .ifc \mp,mu - .equ mpi, 0 + .equ mpi, VTYPE_MU .else .ifc \mp,ma - .equ mpi, 128 + .equ mpi, VTYPE_MA .else .error "Unknown mask policy" .endif