From patchwork Mon Jul 22 19:38:18 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: 50695 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a742:0:b0:482:c625:d099 with SMTP id f2csp2222606vqm; Mon, 22 Jul 2024 12:39:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUm4vydzzj+4FYP7tpKBmkXvxuvAuBH5r1sRzBoNlPFs87wBIjxoQJ9Goiz8gvmIExWza52TiNS+ViLOCVuSyGB6mosaNUOXc2svg== X-Google-Smtp-Source: AGHT+IGRwokldkALa2q5qBoxi1g5hiLu/3rs5MIBizfDRm6KzFQVGXOCJBwQBcl5FptJwqh7NBMj X-Received: by 2002:a17:907:2da8:b0:a72:676a:7d7b with SMTP id a640c23a62f3a-a7a4bfe80ebmr595000266b.9.1721677156397; Mon, 22 Jul 2024 12:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721677156; cv=none; d=google.com; s=arc-20160816; b=fQLmjd2Gz3X0Xy84wfGfsUynSddZdXjeww6CehsmDoEzryFV7fXpgEEKlAWz4eplAp /bWoEF6g45avVVUHh7ZM4Aur65KWgzpB4u98QYD2u0vKI+mcKfNe+7hLnJ5TWrcGkUc9 IEMKdDgXWD1pQP61+rrVAFaK0e0xtjTPbh7G9LtenoXCOoxONSk4zfHQlEfg3S396srt Bl9Wwp+H6bL1d0phbBUIcdXX+GGTZ+gHgaoEyivgNaO8AbW/Vtk3yNzymk+S8m6gUqli /3n6Y+Hn7ac9lsmG7j/JfJJ4jCICuhAnjcZzb81RGglE7kem4iy8t3WrywTnGpm9ZXRO K84g== 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=kCEDHpwoMr9zq6O1K3i8vJ5vJlUkUwPD/4nAlilG3NQ=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=zdRIPbcn0UxrKFW4CjsOllM3Vf6DZPuUr9JUwuMrMyiFWyesBmxLSZ79sK0H4v42K8 uvqKLYF/PzJJ93ljG+KAUNg2u89eUUAI9syvOXCmbRfwB3srLXyn01l3F/oR4QL2+8oC lbjIRk6dLgGZ0kySuZJ60AQVb7lR91u4l1GcQWPa86ArippS2G2o4YgcnsQq/tu5v3PM EdWxuVyB/yCxU9zi01A9LLhhKfI3OtGEb0p/Vl72w7+TVjA7BfTcS2Jh/56sYpzYrWBR gjFF1wuQxlSmkrX5PrdpWthTNBkWo7MKx+L2Z4v6LgUa2MEWV+sUV1xxE4PTC+GKkUVp brRA==; 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-a7a3c993d06si445556566b.1048.2024.07.22.12.39.16; Mon, 22 Jul 2024 12:39:16 -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 C18CA68D720; Mon, 22 Jul 2024 22:38:31 +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 2F92068D4C1 for ; Mon, 22 Jul 2024 22:38:24 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 5F57BC023D for ; Mon, 22 Jul 2024 22:38:19 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Jul 2024 22:38:18 +0300 Message-ID: <20240722193818.50824-6-remi@remlab.net> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240722193818.50824-1-remi@remlab.net> References: <20240722193818.50824-1-remi@remlab.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/6] checkasm/riscv: add forward-edge CFI landing pads 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: CLD5ikHvGY5T --- tests/checkasm/riscv/checkasm.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/checkasm/riscv/checkasm.S b/tests/checkasm/riscv/checkasm.S index 73ca85f344..835cc7d315 100644 --- a/tests/checkasm/riscv/checkasm.S +++ b/tests/checkasm/riscv/checkasm.S @@ -49,6 +49,7 @@ saved_regs: .endr func checkasm_set_function + lpad 0 la.tls.ie t0, checked_func add t0, tp, t0 sd a0, (t0) @@ -56,6 +57,7 @@ func checkasm_set_function endfunc func checkasm_get_wrapper, v + lpad 0 addi sp, sp, -16 sd fp, (sp) sd ra, 8(sp) @@ -74,6 +76,7 @@ func checkasm_get_wrapper, v ret 2: /* <-- Entry point with the Vector extension --> */ + lpad 0 /* Clobber the vectors */ vsetvli t0, zero, e32, m8, ta, ma li t0, 0xdeadbeef @@ -90,6 +93,7 @@ func checkasm_get_wrapper, v csrwi vxsat, 1 /* Saturation: encountered */ 3: /* <-- Entry point without the Vector extension --> */ + lpad 0 /* Save RA, unallocatable and callee-saved registers */ la.tls.ie t0, saved_regs add t0, tp, t0