From: leslie Date: Sun, 17 May 2009 22:19:34 +0000 (+0800) Subject: fix asm constraints for gcc 4.4 X-Git-Tag: 0.9.2~31 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=d18142a2a3fac2745672f3c107d6d3dcd835a7b5;p=sasc-ng.git fix asm constraints for gcc 4.4 --- diff --git a/helper.h b/helper.h index 3430208..d9d2792 100644 --- a/helper.h +++ b/helper.h @@ -54,16 +54,16 @@ template inline void put_misalign(unsigned int v, T* p) #if defined __GNUC__ && __GNUC__ >= 2 && defined __i386__ #define ror16(x,xx) ({ unsigned int v; \ - __asm__ ("rorw %2, %w0" : "=g" (v) : "0" (x), "i" (xx) : "cc"); \ + __asm__ ("rorw %2, %w0" : "=qm" (v) : "0" (x), "i" (xx) : "cc"); \ v; }) #define rol16(x,xx) ({ unsigned int v; \ - __asm__ ("rolw %2, %w0" : "=g" (v) : "0" (x), "i" (xx) : "cc"); \ + __asm__ ("rolw %2, %w0" : "=qm" (v) : "0" (x), "i" (xx) : "cc"); \ v; }) #define sn8(b) ({ unsigned char v; \ if(__builtin_constant_p(b)) \ v=__sn8_const(b); \ else \ - __asm__ ("rorb $4, %b0" : "=g" (v) : "0" (b) : "cc"); \ + __asm__ ("rorb $4, %b0" : "=qm" (v) : "0" (b) : "cc"); \ v; }) #else //__GNUC__