[FFmpeg-devel] [PATCH v3] avutil/mips: Avoid instruction exception caused by gssqc1/gslqc1.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Mon Jul 29 21:54:13 EEST 2019
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.
More information about the ffmpeg-devel
mailing list