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

Rémi Denis-Courmont remi at remlab.net
Thu Jul 27 16:55:00 EEST 2023


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 , and RET should be used anyway, regardless of BTI.
* Keep BR and add BTI J landing pads where appropriate, if this wasn't really a function return.

Br,


More information about the ffmpeg-devel mailing list