From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id E8C7346B37 for ; Fri, 4 Aug 2023 10:49:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 83C7D68C6E7; Fri, 4 Aug 2023 13:49:01 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4B87768C6C1 for ; Fri, 4 Aug 2023 13:48:54 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 374AmqCp005258-374AmqCq005258 for ; Fri, 4 Aug 2023 13:48:52 +0300 Received: from foo.martin.st (host-97-144.parnet.fi [77.234.97.144]) by mail9.parnet.fi (Postfix) with ESMTPS id E84B8A146D for ; Fri, 4 Aug 2023 13:48:52 +0300 (EEST) Date: Fri, 4 Aug 2023 13:48:51 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: Message-ID: <27738246-8171-7c8b-492d-5066d989e5f2@martin.st> References: <667c0538-92d0-84d6-7459-ccb4194f2ea7@arm.com> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] Replace br return with ret 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Thu, 27 Jul 2023, R=E9mi Denis-Courmont wrote: > Hi, > > The use of RET vs BR also has microarchitectural side effects. AFAIU, RET= should always be paired with an earlier BL/BLR to avoid interfering with b= ranch prediction. > > So depending on the circumstances, either one of these should be = > addressed: > * Clarify that this is actually a function return , and RET should be = > used anyway, regardless of BTI. This is the case, and the patch looks good to me. I guess the commit message could be clarified that this is an issue even = without BTI (even if the effect is much harder to notice there). Would this amended commit message be ok with you? (If no input I guess = I'll push it in a few days.) ---8<--- Subject: aarch64/hevc: Replace br return with ret This patch changes the return instruction in the tr_32x4 macro from br to = ret. Function returns should always use the RET instruction instead of BR, to = avoid interfering with branch prediction. On devices that support BTI, this is observeable as a landing pad is = required when branching with BR. The change fixes = fate-hevc-hdr-vivid-metadata when on hardware with BTI support. ---8<--- // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".