Author: tkreuzer
Date: Mon Sep 29 17:43:32 2014
New Revision: 64400
URL:
http://svn.reactos.org/svn/reactos?rev=64400&view=rev
Log:
[SPEC2DEF]
Fix asm stubs for thiscall functions.
CORE-8576 #resolve
Modified:
trunk/reactos/tools/spec2def/spec2def.c
Modified: trunk/reactos/tools/spec2def/spec2def.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/spec2def/spec2def.c?…
==============================================================================
--- trunk/reactos/tools/spec2def/spec2def.c [iso-8859-1] (original)
+++ trunk/reactos/tools/spec2def/spec2def.c [iso-8859-1] Mon Sep 29 17:43:32 2014
@@ -385,7 +385,7 @@
}
void
-Output_symbol(FILE *fileDest, char* pszSymbolName)
+Output_stublabel(FILE *fileDest, char* pszSymbolName)
{
if (giArch == ARCH_ARM)
{
@@ -429,19 +429,21 @@
sprintf(szNameBuffer, "@_stub_%.*s@%d",
pexp->strName.len, pexp->strName.buf, pexp->nStackBytes);
}
- else if (pexp->nCallingConvention == CC_CDECL ||
- pexp->nCallingConvention == CC_STUB)
+ else if ((pexp->nCallingConvention == CC_CDECL) ||
+ (pexp->nCallingConvention == CC_THISCALL) ||
+ (pexp->nCallingConvention == CC_EXTERN) ||
+ (pexp->nCallingConvention == CC_STUB))
{
sprintf(szNameBuffer, "__stub_%.*s",
pexp->strName.len, pexp->strName.buf);
}
- else if (pexp->nCallingConvention == CC_EXTERN)
- {
- sprintf(szNameBuffer, "__stub_%.*s",
- pexp->strName.len, pexp->strName.buf);
- }
-
- Output_symbol(fileDest, szNameBuffer);
+ else
+ {
+ fprintf(stderr, "Invalid calling convention");
+ return 0;
+ }
+
+ Output_stublabel(fileDest, szNameBuffer);
return 1;
}