Fix inline assembly for invocation of g++ with -O0 * SAR takes only an immediate or %cl as operands. Thus, %2 needs to be "c" as shift can't be an immediate. * On x86_64 %3 will be stored in a %rXX, thus we need to widen all used registers to 64bit or introduce matching suffixes for operands of different sizes. Easiest fix is to change all input operands to unsigned long. Danny van Dyk --- src/ptlib/common/jidctflt.cxx.orig 2006-03-07 21:50:28.000000000 +0100 +++ src/ptlib/common/jidctflt.cxx 2006-08-29 12:59:04.000000000 +0200 @@ -89,10 +89,10 @@ "\tsar %2,%1\n" "\tsub $-128,%1\n" "\tcmovl %5,%1\n" /* Use the sub to compare to 0 */ - "\tcmpl %4,%1\n" + "\tcmp %4,%1\n" "\tcmovg %4,%1\n" : "=r"(x) - : "0"(x), "Ir"(shift), "ir"(1UL<<(shift-1)), "r" (0xff), "r" (0) + : "0"((unsigned long)x), "c"((char)shift), "ir"(1UL<<(shift-1)), "r" (0xffUL), "r" (0UL) ); return x; }