Answer the question
In order to leave comments, you need to log in
What does this function do?
Hello, what is the purpose of this function? Thank you!
int asmFunction(void)
{
static int internalValue = 1;
#ifdef __GNUC__
__asm__("movl %0, %%eax\n\t"
"add %%eax, %0"
: "=r" (internalValue)
: "r" (internalValue));
#elif _MSC_VER
_asm {
mov eax, internalValue
add internalValue, eax
};
#endif
return internalValue;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question