Re: [FFmpeg-devel] [PATCH] Replace br return with ret

2023-08-08 Thread Martin Storsjö
On Tue, 8 Aug 2023, Casey Smalley wrote: This patch changes the return instruction in the tr_32x4 macro from br to ret. Using ret properly hints that the branch is a function return. On devices that support BTI a landing pad is required when branching with br, or the instruction can be replace

[FFmpeg-devel] [PATCH] Replace br return with ret

2023-08-08 Thread Casey Smalley
This patch changes the return instruction in the tr_32x4 macro from br to ret. Using ret properly hints that the branch is a function return. On devices that support BTI a landing pad is required when branching with br, or the instruction can be replaced with a ret. The change fixes fate-hevc-h

Re: [FFmpeg-devel] [PATCH] Replace br return with ret

2023-08-04 Thread Martin Storsjö
On Thu, 27 Jul 2023, Rémi 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 branch prediction. So depending on the circumstances, either one of these should be addresse

Re: [FFmpeg-devel] [PATCH] Replace br return with ret

2023-08-04 Thread Casey Smalley
Hi, Just wondering what current thoughts on the patch was. It looks as though the change is fine, but if there is still an issue I can submit a new patch using BTI landing pads instead. Best regards, Casey. On 7/27/23 18:22, Reimar Döffinger wrote: On 27 Jul 2023, at 15:55, Rémi Denis-Cou

Re: [FFmpeg-devel] [PATCH] Replace br return with ret

2023-07-27 Thread Reimar Döffinger
> On 27 Jul 2023, at 15:55, Rémi 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 > branch prediction. > > So depending on the circumstances, either one of th

Re: [FFmpeg-devel] [PATCH] Replace br return with ret

2023-07-27 Thread Rémi Denis-Courmont
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 branch prediction. So depending on the circumstances, either one of these should be addressed: * Clarify that this is actually a function return

[FFmpeg-devel] [PATCH] Replace br return with ret

2023-07-27 Thread Casey Smalley
This patch changes the return instruction in the tr_32x4 macro from br to ret. On devices that support BTI a landing pad is required when branching with br, or the instruction can be replaced with a ret. The change fixes fate-hevc-hdr-vivid-metadata when on hardware with BTI support. Signed-off