[FFmpeg-devel] [PATCH v3] avutil/mips: Avoid instruction exception caused by gssqc1/gslqc1.

Shiyou Yin yinshiyou-hf at loongson.cn
Wed Jul 31 04:30:13 EEST 2019


>-----Original Message-----
>From: ffmpeg-devel-bounces at ffmpeg.org [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of
>Reimar D?ffinger
>Sent: Tuesday, July 30, 2019 2:54 AM
>To: FFmpeg development discussions and patches
>Subject: Re: [FFmpeg-devel] [PATCH v3] avutil/mips: Avoid instruction exception caused by gssqc1/gslqc1.
>
>On 29.07.2019, at 11:54, "Shiyou Yin" <yinshiyou-hf at loongson.cn> wrote:
>>>
>> DECLARE_ALIGNED is defined in ' libavutil/mem.h ' and related to compiler. No matter mips or x86,
>> it's definition is ' #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v' when build
>> with gcc or clang (Specific implementation within the compiler is not considered here.).
>> In libavcodec/x86, DECLARE_ALIGNED is used to define 8/16/32-byte aligned variable too.
>
>The aligned attribute does not work reliably with stack variables in some cases.
>Compare with other code, I think you need to use LOCAL_ALIGNED_16 for the stack variable.
>Yes, it might work in your test even with DECLARE_ALIGNED, but it might not be robust.

You are right, LOCAL_ALIGNED_16 might be more robust.
In v5 LOCAL_ALIGNED_16 is used for the stack variables .




More information about the ffmpeg-devel mailing list