Author: Dieter Buerssner
Date: 10:22:02 01/18/03
Go up one level in this thread
On January 18, 2003 at 05:16:06, Matt Taylor wrote:
>GCC-style:
>asm("\txorl\t%%eax, %%eax\n
> "\tmovl\t$1, %%edx\n"
>
> "\tshll\t%%cl, %%edx\n"
> "\ttestl\t$32, %%ecx\n"
> "\tmovl\t$0, %%ecx\n"
>
> "\tcmovnzl\t%%edx, %%eax\n"
> "\tcmovnzl\t%%ecx, %%edx\n"
> : "=A" (index) : "c" (count), "A" (1));
This is very fragile code. You are not telling the compiler, that you modify
ecx, and the flags register. Does "A" mean the edx:eax pair? The input ("A" (1))
does not seem to make sense, because you set it in the assembly anyway.
Regards,
Dieter
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.