From patchwork Thu Nov 16 16:04:51 2023 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: 44684 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bc9c:b0:181:818d:5e7f with SMTP id fx28csp494880pzb; Thu, 16 Nov 2023 08:05:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGTM8SIT1VBimJ7vuo0MdMiwbfOTyHEytlR0WkyqB7BI+TzBUyzUDTdlJ89jKa0p4pM3hY2 X-Received: by 2002:a17:906:410e:b0:9bf:b022:dc7 with SMTP id j14-20020a170906410e00b009bfb0220dc7mr12614383ejk.48.1700150704504; Thu, 16 Nov 2023 08:05:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700150704; cv=none; d=google.com; s=arc-20160816; b=cSkhx0Yqi4wYX1sLQlKS3esz7Y2ylKox59m3A5NFsI2yWhBM7erbVmu51r5l6APt9y YVB/8Oaoa8m6UNO9m2uBin6bPOzwhTa6fCMNo4NpHASw2RhLDL14kNustB+A8ylQxCTe GSO12tKqxrrdoJPOL4TgCAqfbseCbGy5SOdR74s7AHpAW5rxn2zIB1cdnVfF182N6AvV x4Wnq/506F44ZoJad7zmHKRirM/TCpG1fZ2KAuA6uJXO2jzl6z9tw3DMBUOg3kb39O6C 5maE+AH8D4x1cylVFdpRqjuOK4NIJpqCUDYdeSA4JA5nl3lWzEWt/jDUzbGuSdSnoHXO JIMQ== 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=ZrFP5fXObWOVf/qdW1SZZcLbh6jVO16YIYCvGl4i78U=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=yVQi3iIuv372TAcBxcFWxYngYvXDR+09XfXoraXZpyNaGh+Yud9wm+Vwspz1JiQUww cviSC8mTxDupvFwsr4RnSZQUsdRD9QcofwX4PwEZrbOHJ+dIqv9s2Nv13X+T1E9u+2j8 ToyOiguYx73zMC7c5NzyEGBGrhdalbDMlbcMAqoQoeJy48n8RR2pnnEw28INr0FO+GvR ot29vcoOrJB6JgL287nljIcJ0JxeAjTJW5YsPRRtLKZXHR/mB9U3ddPLqpUtcCevGXfI Q5eJ9XE3XcRl3KbO+uTO9lrYOjhn0QKTutsxRak2v16bIXr1Bdiz+lFzOMyWnkfI1cw3 muSg== 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 qk9-20020a1709077f8900b009c17cb999d2si7662287ejc.515.2023.11.16.08.05.02; Thu, 16 Nov 2023 08:05:04 -0800 (PST) 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 8E1F268CBCE; Thu, 16 Nov 2023 18:04:58 +0200 (EET) 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 43C3668CBD4 for ; Thu, 16 Nov 2023 18:04:52 +0200 (EET) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id AD374C0170 for ; Thu, 16 Nov 2023 18:04:51 +0200 (EET) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Nov 2023 18:04:51 +0200 Message-ID: <20231116160451.37296-1-remi@remlab.net> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] checkasm/riscv: use t0 as alternative link register 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: fNuq0l4FjrLx The unprivileged ISA specification says that either RA or T0 should be used for this purpose. Other registers may confuse the return address prediction stack. --- tests/checkasm/riscv/checkasm.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/checkasm/riscv/checkasm.S b/tests/checkasm/riscv/checkasm.S index 73ca85f344..b902ab1043 100644 --- a/tests/checkasm/riscv/checkasm.S +++ b/tests/checkasm/riscv/checkasm.S @@ -123,10 +123,10 @@ func checkasm_get_wrapper, v /* Call the tested function */ la.tls.ie t0, checked_func - add t0, tp, t0 - ld t1, (t0) - sd zero, (t0) - jalr t1 + add t1, tp, t0 + ld t0, (t1) + sd zero, (t1) + jalr t0 /* Check special register values */ la.tls.ie t0, saved_regs