Geschrieben von:/Posted by: Steve Maughan at 26 March 2004 23:07:27:
I'm currently using Visual Studio to develop Monarch. This is fine but I'd also like to experiment with GCC. However I do have these two classic pieces of assembler in my code:
__forceinline int bsf(bitboard a)
{ __asm
{
bsf eax, dword ptr[a + 4]
add eax, 32
bsf eax, dword ptr[a]
}
};
__forceinline int bsr(bitboard a)
{ __asm
{
bsr eax, dword ptr[a]
sub eax, 32
bsr eax, dword ptr[a + 4]
add eax, 32
}
}
Since they are in Intel's format and not the AT&T format that is recognized by GCC they will not compile (even when I remove the __forceinline). Does anyone know of the AT&T equivalents to these procedure? Are there any experts that could convert them?
Thanks,
Steve Maughan