static int g_stack_clear_start; // in dwords
static int g_stack_clear_len;
static int g_regmask_init;
+static int g_regmask_rm;
static int g_skip_func;
static int g_allow_regfunc;
static int g_allow_user_icall;
}
// declare normal registers
- regmask_now = regmask & ~regmask_arg;
+ regmask_now = regmask & ~regmask_arg & ~g_regmask_rm;
regmask_now &= ~(1 << xSP);
if (regmask_now & 0x00ff) {
for (reg = 0; reg < 8; reg++) {
static const char *attrs[] = {
"clear_sf",
"clear_regmask",
+ "rm_regmask",
};
// parse manual attribute-list comment
else if (i == 1)
// clear_regmask=<mask>
ret = sscanf(p, "=%x%n", &g_regmask_init, &j) + 1;
+ else if (i == 2)
+ // rm_regmask=<mask>
+ ret = sscanf(p, "=%x%n", &g_regmask_rm, &j) + 1;
if (ret < 2) {
anote("unparsed attr value: %s\n", p);
break;
g_stack_clear_start = 0;
g_stack_clear_len = 0;
g_regmask_init = 0;
+ g_regmask_rm = 0;
skip_warned = 0;
g_skip_func = 0;
g_func[0] = 0;
WINBASEAPI HGLOBAL WINAPI GlobalHandle(PCVOID);
WINBASEAPI LPVOID WINAPI GlobalLock(HGLOBAL);
WINBASEAPI VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
+
+WINBASEAPI BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
+WINBASEAPI HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,DWORD,UINT);
+WINBASEAPI DWORD WINAPI GlobalSize(HGLOBAL);
+WINBASEAPI VOID WINAPI GlobalUnfix(HGLOBAL); /* Obsolete: Has no effect. */
+WINBASEAPI BOOL WINAPI GlobalUnlock(HGLOBAL);
+WINBASEAPI BOOL WINAPI GlobalUnWire(HGLOBAL); /* Obsolete: Has no effect. */
+WINBASEAPI PVOID WINAPI GlobalWire(HGLOBAL); /* Obsolete: Has no effect. */
+WINBASEAPI PVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD);
+SIZE_T WINAPI HeapCompact(HANDLE,DWORD);
+WINBASEAPI HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD);
WINBASEAPI BOOL WINAPI HeapDestroy(HANDLE);
WINBASEAPI BOOL WINAPI HeapFree(HANDLE,DWORD,PVOID);
+WINBASEAPI BOOL WINAPI HeapLock(HANDLE);
+WINBASEAPI BOOL WINAPI HeapQueryInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T);
+WINBASEAPI PVOID WINAPI HeapReAlloc(HANDLE,DWORD,PVOID,DWORD);
+WINBASEAPI BOOL WINAPI HeapSetInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T);
+WINBASEAPI DWORD WINAPI HeapSize(HANDLE,DWORD,PCVOID);
+WINBASEAPI BOOL WINAPI HeapUnlock(HANDLE);
+WINBASEAPI BOOL WINAPI HeapValidate(HANDLE,DWORD,PCVOID);
+WINBASEAPI BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
+WINBASEAPI BOOL WINAPI ImpersonateLoggedOnUser(HANDLE);
+WINBASEAPI BOOL WINAPI ImpersonateNamedPipeClient(HANDLE);
+WINBASEAPI BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
+WINBASEAPI BOOL WINAPI InitAtomTable(DWORD);
+WINBASEAPI BOOL WINAPI InitializeAcl(PACL,DWORD,DWORD);
+WINBASEAPI VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION);
+WINBASEAPI BOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION,DWORD);
+WINBASEAPI DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION,DWORD);
+WINBASEAPI BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
+WINBASEAPI BOOL WINAPI InitializeSid (PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
WINBASEAPI VOID WINAPI InitializeSListHead(PSLIST_HEADER);
+
LONG WINAPI InterlockedCompareExchange(volatile LONG *,LONG,LONG);
LONG WINAPI InterlockedDecrement(volatile LONG *);
LONG WINAPI InterlockedExchange(volatile LONG *,LONG);
LONG WINAPI InterlockedIncrement(volatile LONG *);
PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER);
PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY);
-WINBASEAPI BOOL WINAPI InitializeAcl(PACL,DWORD,DWORD);
-WINBASEAPI BOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION,DWORD);
WINBASEAPI BOOL WINAPI IsBadCodePtr(FARPROC);
WINBASEAPI BOOL WINAPI IsBadHugeReadPtr(LPCVOID,UINT);
WINBASEAPI BOOL WINAPI IsBadHugeWritePtr(PVOID,UINT);
WINBASEAPI BOOL WINAPI FreeUserPhysicalPages(HANDLE,PULONG_PTR,PULONG_PTR);
WINBASEAPI BOOL WINAPI MapUserPhysicalPages(PVOID,ULONG_PTR,PULONG_PTR);
WINBASEAPI BOOL WINAPI MapUserPhysicalPagesScatter(PVOID*,ULONG_PTR,PULONG_PTR);
-WINBASEAPI DWORD WINAPI HeapSize(HANDLE,DWORD,LPCVOID);
-WINBASEAPI HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD);
-WINBASEAPI PVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD);
-WINBASEAPI PVOID WINAPI HeapReAlloc(HANDLE,DWORD,PVOID,DWORD);
-WINBASEAPI VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION);
WINBASEAPI void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION);
WINBASEAPI BOOL WINAPI GetCPInfoExA(UINT,DWORD,LPCPINFOEXA);