解决 gcc风格
以下是引用vfdff在2010-8-16 20:44:38的发言:
LPVOID GetClassFnAddress(...) //Add 2010.8.6
{
LPVOID FnAddress;
__asm
{
lea eax,FnAddress
mov edx,[ebp+8]
mov [eax],edx
}
return FnAddress;
}
上述内嵌汇编函数怎么转为gcc风格呢?(源代码为VC上的汇编代码,格式: 指令 目的操作数,源操作数)
LPVOID GetClassFnAddress(...)
//Add
2010.8.6
{
LPVOID FnAddress;
__asm__ __volatile__("leal
%0,%%eax"::"m"(FnAddress));
// line 20
__asm__ __volatile__("movl
8(%ebp), %edx");
__asm__ __volatile__("movl
%edx, (%eax)");
return FnAddress;
}