Author: jgardou
Date: Tue Dec 21 22:19:16 2010
New Revision: 50086
URL:
http://svn.reactos.org/svn/reactos?rev=50086&view=rev
Log:
[SPEC2DEF]
- handle int64 parameter type
Modified:
branches/cmake-bringup/tools/spec2def/spec2def.c
Modified: branches/cmake-bringup/tools/spec2def/spec2def.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/spec2def/sp…
==============================================================================
--- branches/cmake-bringup/tools/spec2def/spec2def.c [iso-8859-1] (original)
+++ branches/cmake-bringup/tools/spec2def/spec2def.c [iso-8859-1] Tue Dec 21 22:19:16
2010
@@ -46,7 +46,8 @@
ARG_PTR,
ARG_STR,
ARG_WSTR,
- ARG_DBL
+ ARG_DBL,
+ ARG_INT64
};
char* astrCallingConventions[] =
@@ -161,7 +162,7 @@
case ARG_PTR: fprintf(file, "void*"); break;
case ARG_STR: fprintf(file, "char*"); break;
case ARG_WSTR: fprintf(file, "wchar_t*"); break;
- case ARG_DBL: fprintf(file, "__int64"); break;
+ case ARG_DBL: case ARG_INT64 : fprintf(file, "__int64"); break;
}
fprintf(file, " a%d", i);
}
@@ -178,6 +179,7 @@
case ARG_STR: fprintf(file, "'%%s'"); break;
case ARG_WSTR: fprintf(file, "'%%ws'"); break;
case ARG_DBL: fprintf(file, "%%\"PRix64\""); break;
+ case ARG_INT64: fprintf(file, "0x%%ll"); break;
}
}
fprintf(file, ")\\n\"");
@@ -192,6 +194,7 @@
case ARG_STR: fprintf(file, "(char*)a%d", i); break;
case ARG_WSTR: fprintf(file, "(wchar_t*)a%d", i); break;
case ARG_DBL: fprintf(file, "(__int64)a%d", i); break;
+ case ARG_INT64: fprintf(file, "(__int64)a%d", i); break;
}
}
fprintf(file, ");\n");
@@ -527,6 +530,11 @@
{
exp.nStackBytes += sizeof(void*);
exp.anArgs[exp.nArgCount] = ARG_PTR; // FIXME: handle strings
+ }
+ else if (CompareToken(pc, "int64"))
+ {
+ exp.nStackBytes += 8;
+ exp.anArgs[exp.nArgCount] = ARG_INT64; // FIXME: handle strings
}
else
fprintf(stderr, "error: line %d, expected type, got:
%.10s\n", nLine, pc);