From 43171a2a738f5114768d34a7278e56e5fde714bc Mon Sep 17 00:00:00 2001 From: Thomas Köppe Date: Sun, 12 Nov 2017 16:24:37 +0000 Subject: Fix missing used attribute for inline assembly variables Variables used in inline assembly need to be marked with attribute((used)). Static constants already were, via the define of DECLARE_ASM_CONST. But DECLARE_ALIGNED does not add this attribute, and some of the variables defined with it are const only used in inline assembly, and therefore appeared dead. This change adds a macro DECLARE_ASM_ALIGNED that marks variables as used. This change makes FFMPEG work with Clang's ThinLTO. Signed-off-by: Michael Niedermayer --- libswscale/x86/swscale.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libswscale') diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index 869e7fb176..7dc2d70574 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -53,13 +53,13 @@ DECLARE_ASM_CONST(8, uint64_t, b15Mask)= 0x001F001F001F001FLL; DECLARE_ASM_CONST(8, uint64_t, g15Mask)= 0x03E003E003E003E0LL; DECLARE_ASM_CONST(8, uint64_t, r15Mask)= 0x7C007C007C007C00LL; -DECLARE_ALIGNED(8, const uint64_t, ff_M24A) = 0x00FF0000FF0000FFLL; -DECLARE_ALIGNED(8, const uint64_t, ff_M24B) = 0xFF0000FF0000FF00LL; -DECLARE_ALIGNED(8, const uint64_t, ff_M24C) = 0x0000FF0000FF0000LL; +DECLARE_ASM_ALIGNED(8, const uint64_t, ff_M24A) = 0x00FF0000FF0000FFLL; +DECLARE_ASM_ALIGNED(8, const uint64_t, ff_M24B) = 0xFF0000FF0000FF00LL; +DECLARE_ASM_ALIGNED(8, const uint64_t, ff_M24C) = 0x0000FF0000FF0000LL; -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YOffset) = 0x1010101010101010ULL; -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UVOffset) = 0x8080808080808080ULL; -DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL; +DECLARE_ASM_ALIGNED(8, const uint64_t, ff_bgr2YOffset) = 0x1010101010101010ULL; +DECLARE_ASM_ALIGNED(8, const uint64_t, ff_bgr2UVOffset) = 0x8080808080808080ULL; +DECLARE_ASM_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL; //MMX versions -- cgit v1.2.3