comparison x86/mathops.h @ 11200:cd8a77473dd1 libavcodec

Move NEG_[US]SR32 macros to mathops.h
author mru
date Wed, 17 Feb 2010 23:58:59 +0000
parents 38b3b209b4bc
children 21fd8b4dfab9
comparison
equal deleted inserted replaced
11199:f1b38a8588b2 11200:cd8a77473dd1
76 : "+&r" (x), "+&r" (a), "+r" (c)\ 76 : "+&r" (x), "+&r" (a), "+r" (c)\
77 : "r" (y), "r" (b), "r" (d)\ 77 : "r" (y), "r" (b), "r" (d)\
78 ); 78 );
79 #endif 79 #endif
80 80
81 // avoid +32 for shift optimization (gcc should do that ...)
82 #define NEG_SSR32 NEG_SSR32
83 static inline int32_t NEG_SSR32( int32_t a, int8_t s){
84 __asm__ ("sarl %1, %0\n\t"
85 : "+r" (a)
86 : "ic" ((uint8_t)(-s))
87 );
88 return a;
89 }
90
91 #define NEG_USR32 NEG_USR32
92 static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
93 __asm__ ("shrl %1, %0\n\t"
94 : "+r" (a)
95 : "ic" ((uint8_t)(-s))
96 );
97 return a;
98 }
99
81 #endif /* AVCODEC_X86_MATHOPS_H */ 100 #endif /* AVCODEC_X86_MATHOPS_H */