Mercurial > libavutil.hg
comparison mem.h @ 434:61beff437735 libavutil
Add and use DECLARE_ASM_CONST for constants used in assembler code.
Should make it easier to work around compilation problems with e.g. ICC.
author | reimar |
---|---|
date | Sun, 27 Jan 2008 20:50:16 +0000 |
parents | ae3fbcfbad4c |
children | 945e9a276df9 |
comparison
equal
deleted
inserted
replaced
433:0839746f3fcf | 434:61beff437735 |
---|---|
26 #ifndef FFMPEG_MEM_H | 26 #ifndef FFMPEG_MEM_H |
27 #define FFMPEG_MEM_H | 27 #define FFMPEG_MEM_H |
28 | 28 |
29 #ifdef __GNUC__ | 29 #ifdef __GNUC__ |
30 #define DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n))) | 30 #define DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n))) |
31 #define DECLARE_ASM_CONST(n,t,v) static const t v attribute_used __attribute__ ((aligned (n))) | |
31 #else | 32 #else |
32 #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v | 33 #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v |
34 #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v | |
33 #endif | 35 #endif |
34 | 36 |
35 /** | 37 /** |
36 * Allocate a block of \p size bytes with alignment suitable for all | 38 * Allocate a block of \p size bytes with alignment suitable for all |
37 * memory accesses (including vectors if available on the CPU). | 39 * memory accesses (including vectors if available on the CPU). |