From: "Richard" Subject: Extended Assembly Date: Wed, 24 Dec 1997 01:25:30 +0100 Lines: 107 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: Newsgroups: comp.os.msdos.djgpp To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I ran into a problem with extended assembly. It seems to ignore my clobber list and reuse the registers. Usually it works save in some situation such as the following : (I tried to narrow it down to a example not too artificial) ********************************** long overflow; #define addll(x, y) \ ({ \ long __result; \ asm( \ "movl %1,%%eax \n\t" \ "xorl %%edx,%%edx \n\t" \ "addl %2,%%eax \n\t" \ "adcl %%edx,%%edx \n\t" \ "movl %%edx,_overflow \n\t" \ :"=a" (__result) \ :"g" (x), "g" (y) \ :"%eax", "%edx", "memory" \ ); \ __result; \ }) long * f(long *x, long *y, long *z,int lx){ int i, j; for(i=1;i