[FFmpeg-devel] [PATCH] arm: Consistently use proper interworking function returns
Martin Storsjö
martin at martin.st
Wed Oct 9 09:55:59 EEST 2024
On Fri, 4 Oct 2024, Martin Storsjö wrote:
> Use "bx lr", or "pop {lr}", which do proper mode switching
> between thumb and arm modes. A plain "mov pc, lr" does not switch
> from thumb mode to arm mode (while in arm mode, it does switch
> mode for a thumb caller).
>
> This is normally not an issue, as CONFIG_THUMB only is enabled if
> the C compiler defaults to thumb; but stick to patterns that can
> do mode switching if needed, for consistency.
> ---
> libswresample/arm/resample.S | 8 ++++----
> libswscale/arm/hscale.S | 3 +--
> libswscale/arm/output.S | 3 +--
> libswscale/arm/yuv2rgb_neon.S | 3 +--
> 4 files changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/libswresample/arm/resample.S b/libswresample/arm/resample.S
> index 3ce7623246..791f4cc016 100644
> --- a/libswresample/arm/resample.S
> +++ b/libswresample/arm/resample.S
> @@ -30,7 +30,7 @@ function ff_resample_common_apply_filter_x4_float_neon, export=1
> vpadd.f32 d0, d0, d1 @ pair adding of the 4x32-bit accumulated values
> vpadd.f32 d0, d0, d0 @ pair adding of the 4x32-bit accumulator values
> vst1.32 {d0[0]}, [r0] @ write accumulator
> - mov pc, lr
> + bx lr
> endfunc
Will push.
// Martin
More information about the ffmpeg-devel
mailing list