# HG changeset patch # User Matt Johnston # Date 1322663246 -28800 # Node ID 8622ee48fab5c3b809ead9c294c60d0b428628e7 # Parent ff5cc422ba4037af3e476422a1208292504fde3d - Work around broken asm constraint behaviour on 32bit x86 OS X diff -r ff5cc422ba40 -r 8622ee48fab5 tomsfastmath/src/mul/fp_mul_comba.c --- a/tomsfastmath/src/mul/fp_mul_comba.c Wed Nov 23 18:11:51 2011 +0700 +++ b/tomsfastmath/src/mul/fp_mul_comba.c Wed Nov 30 22:27:26 2011 +0800 @@ -47,13 +47,15 @@ /* this should multiply i and j */ #define MULADD(i, j) \ + do { fp_digit ti = (i); \ + fp_digit tj = (j); \ asm( \ "movl %6,%%eax \n\t" \ "mull %7 \n\t" \ "addl %%eax,%0 \n\t" \ "adcl %%edx,%1 \n\t" \ "adcl $0,%2 \n\t" \ - :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","%cc"); + :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(ti), "m"(tj) :"%eax","%edx","%cc"); } while (0); #elif defined(TFM_X86_64) /* x86-64 optimized */