Author: Christophe Drieu
Date: 10:08:43 05/21/04
Go up one level in this thread
It's ok now, Thank you bob.
a=4;b=0;
__asm__ (
"movl %0, %%eax" "\n\t"
"incl %%eax" "\n\t"
"movl %%eax, %1" "\n\t"
"movl %%eax, %2" "\n\t"
:"=g"(a)
:"g"(b),"g"(a)
:"ax","memory"
);
printf("a=%d b=%d\n", a, b); // a=5 b=5
PS: Is there any way to let the compiler choose the register to use ?
Regards
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.