I have a simple inline assembly function, which works fine in MSVC, but for some reason refuses to work under Apple GCC 4.2.1 (i386 arch, forced 32-bit mode). Fortunately, much more complex assembly functions work fine, however I can't fathom why won't this one work... Unfortunately, I can't debug it - by the look of things there is no registers window in XCode 4.0.2 (it was in 3.2 versions).
I'm positive that the problem is not related with Intel style assembly.
int Convert(double value)
{
_asm
{
fld value
push eax
fistp dword ptr [esp]
pop eax
}
// The returned value is insane
}