mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 01:13:38 +00:00
[SPEC2DEF]
Fix asm stubs for thiscall functions. CORE-8576 #resolve svn path=/trunk/; revision=64400
This commit is contained in:
parent
87295edaa9
commit
5b164bcd85
|
@ -385,7 +385,7 @@ OutputHeader_asmstub(FILE *file, char *libname)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Output_symbol(FILE *fileDest, char* pszSymbolName)
|
Output_stublabel(FILE *fileDest, char* pszSymbolName)
|
||||||
{
|
{
|
||||||
if (giArch == ARCH_ARM)
|
if (giArch == ARCH_ARM)
|
||||||
{
|
{
|
||||||
|
@ -429,19 +429,21 @@ OutputLine_asmstub(FILE *fileDest, EXPORT *pexp)
|
||||||
sprintf(szNameBuffer, "@_stub_%.*s@%d",
|
sprintf(szNameBuffer, "@_stub_%.*s@%d",
|
||||||
pexp->strName.len, pexp->strName.buf, pexp->nStackBytes);
|
pexp->strName.len, pexp->strName.buf, pexp->nStackBytes);
|
||||||
}
|
}
|
||||||
else if (pexp->nCallingConvention == CC_CDECL ||
|
else if ((pexp->nCallingConvention == CC_CDECL) ||
|
||||||
pexp->nCallingConvention == CC_STUB)
|
(pexp->nCallingConvention == CC_THISCALL) ||
|
||||||
|
(pexp->nCallingConvention == CC_EXTERN) ||
|
||||||
|
(pexp->nCallingConvention == CC_STUB))
|
||||||
{
|
{
|
||||||
sprintf(szNameBuffer, "__stub_%.*s",
|
sprintf(szNameBuffer, "__stub_%.*s",
|
||||||
pexp->strName.len, pexp->strName.buf);
|
pexp->strName.len, pexp->strName.buf);
|
||||||
}
|
}
|
||||||
else if (pexp->nCallingConvention == CC_EXTERN)
|
else
|
||||||
{
|
{
|
||||||
sprintf(szNameBuffer, "__stub_%.*s",
|
fprintf(stderr, "Invalid calling convention");
|
||||||
pexp->strName.len, pexp->strName.buf);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Output_symbol(fileDest, szNameBuffer);
|
Output_stublabel(fileDest, szNameBuffer);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue