10#define EFLAGS_TF 0x100L
11#define EFLAGS_INTERRUPT_MASK 0x200L
33KiFastSystemCallRet(
VOID);
45 if (Instructions[
i] == 0xB8)
60 ok(hUser32 !=
NULL,
"Failed to load user32.dll\n");
85 CONTEXT PreContext, PostContext;
102#elif defined(_M_AMD64)
104 PULONG64 IntegerRegs = &PreContext.Rax;
105 PM128A XmmRegs = &PreContext.Xmm0;
116 PreContext.
SegDs = 0;
117 PreContext.
SegEs = 0;
118 PreContext.
SegFs = 0;
119 PreContext.
SegGs = 0;
120 PreContext.
SegSs = 0;
161 "Expected 0x002B, got 0x%04X\n", PostContext.
SegDs);
163 "Expected 0x002B, got 0x%04X\n", PostContext.
SegEs);
165 "Expected 0x002B, got 0x%04X\n", PostContext.
SegFs);
167 "Expected 0x002B, got 0x%04X\n", PostContext.
SegGs);
195#error Unsupported architecture
199#define ValidateSyscall(SyscallId, Result) ValidateSyscall_(__FILE__, __LINE__, SyscallId, Result)
209 skip(
"Skipping syscall tests on WOW64\n");
223 ok(hHandler !=
NULL,
"Failed to add vectored exception handler\n");
242 RemoveVectoredExceptionHandler(hHandler);
285 Cycles = End -
Start;
291 TotalCycles += Cycles;
296 AvgCycles = (
double)TotalCycles / (
Count - Outliers);
298 trace(
"NtFlushWriteBuffer: avg %.2f cycles, min %I64u, max %I64u, Outliers %lu\n",
299 AvgCycles,
Min,
Max, Outliers);
308 skip(
"Failed to initialize.\n");
#define EFLAGS_INTERRUPT_MASK
ULONG_PTR DoSyscallWithUnalignedStack(_In_ ULONG64 SyscallNumber)
VOID DoSyscallAndCaptureContext(_In_ ULONG SyscallNumber, _Out_ PCONTEXT PreContext, _Out_ PCONTEXT PostContext)
static BOOLEAN InitSysCalls()
const UCHAR SyscallReturn
VOID ValidateSyscall_(_In_ PCCH File, _In_ ULONG Line, _In_ ULONG_PTR SyscallId, _In_ ULONG_PTR Result)
ULONG g_NoopSyscallNumber
static VOID Test_SyscallPerformance()
#define ValidateSyscall(SyscallId, Result)
static VOID Test_SyscallNumbers()
static LONG WINAPI VectoredExceptionHandlerForUserModeCallback(struct _EXCEPTION_POINTERS *ExceptionInfo)
NTSTATUS NTAPI NtCallbackReturn(_In_ PVOID Result, _In_ ULONG ResultLength, _In_ NTSTATUS CallbackStatus)
#define ok_eq_ulong(value, expected)
#define ok_eq_hex64(value, expected)
#define ok_eq_hex_(file, line, value, expected)
#define ok_eq_hex64_(file, line, value, expected)
DWORD_PTR WINAPI SetThreadAffinityMask(IN HANDLE hThread, IN DWORD_PTR dwThreadAffinityMask)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define EXCEPTION_CONTINUE_SEARCH
PPC_QUAL unsigned long long __rdtsc(void)
unsigned __int64 * PULONG64
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
NTSYSAPI ULONG NTAPI RtlRandom(_Inout_ PULONG Seed)
#define NtCurrentProcess()
NTSTATUS NTAPI NtFlushWriteBuffer(VOID)
#define STATUS_ACCESS_VIOLATION
#define STATUS_INVALID_SYSTEM_SERVICE
_In_ WDFCOLLECTION _In_ ULONG Index
HANDLE WINAPI GetCurrentThread(void)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO