diff mbox

[FFmpeg-devel] lavu/mem: clamp alignment to 16 for DJGPP

Message ID 20170327183321.9566-1-u@pkh.me
State Accepted
Commit 1473afac5d11a0a90810b6cd8107d63640c9fd38
Headers show

Commit Message

Clément Bœsch March 27, 2017, 6:33 p.m. UTC
See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80208
---
 libavutil/mem.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Clément Bœsch March 29, 2017, 1:56 p.m. UTC | #1
On Mon, Mar 27, 2017 at 08:33:21PM +0200, Clément Bœsch wrote:
> See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80208
> ---
>  libavutil/mem.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavutil/mem.h b/libavutil/mem.h
> index 718a143c4c..527cd03191 100644
> --- a/libavutil/mem.h
> +++ b/libavutil/mem.h
> @@ -97,6 +97,9 @@
>      #define DECLARE_ASM_CONST(n,t,v)                    \
>          AV_PRAGMA(DATA_ALIGN(v,n))                      \
>          static const t __attribute__((aligned(n))) v
> +#elif defined(__DJGPP__)
> +    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (FFMIN(n, 16)))) v
> +    #define DECLARE_ASM_CONST(n,t,v)    static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
>  #elif defined(__GNUC__) || defined(__clang__)
>      #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
>      #define DECLARE_ASM_CONST(n,t,v)    static const t av_used __attribute__ ((aligned (n))) v

applied
diff mbox

Patch

diff --git a/libavutil/mem.h b/libavutil/mem.h
index 718a143c4c..527cd03191 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -97,6 +97,9 @@ 
     #define DECLARE_ASM_CONST(n,t,v)                    \
         AV_PRAGMA(DATA_ALIGN(v,n))                      \
         static const t __attribute__((aligned(n))) v
+#elif defined(__DJGPP__)
+    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (FFMIN(n, 16)))) v
+    #define DECLARE_ASM_CONST(n,t,v)    static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
 #elif defined(__GNUC__) || defined(__clang__)
     #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
     #define DECLARE_ASM_CONST(n,t,v)    static const t av_used __attribute__ ((aligned (n))) v