31 ok(p1 !=
Filter1,
"SetUnhandledExceptionFilter returned what was set, not prev\n");
32 ok(p2 !=
Filter2,
"SetUnhandledExceptionFilter returned what was set, not prev\n");
33 ok(p2 ==
Filter1,
"SetUnhandledExceptionFilter didn't return previous filter\n");
34 ok(p1 != p2,
"SetUnhandledExceptionFilter seems to return random stuff\n");
37 ok(p1 ==
Filter2,
"SetUnhandledExceptionFilter didn't return previous filter\n");
45 trace(
"Exception raised while using SSE instructions.\n");
51 trace(
"Unexpected exception code, terminating!\n");
59#elif defined(_M_AMD64)
62#error Architecture not handled
80 trace(
"Exception raised while dividing by 0.\n");
86 trace(
"Unexpected exception code, terminating!\n");
96#elif defined(_M_AMD64)
99#error Architecture not handled
105#if defined(__clang__) || defined(__GNUC__)
116 ok(
p ==
NULL,
"Previous filter should be NULL\n");
118#if !defined(_M_AMD64)
129 "xorps %%xmm0, %%xmm0\n"
137 skip(
"CPU doesn't support SSE instructions.\n");
156 __m128 xmm1 = { { 1., 1. } }, xmm2 = { { 0 } };
179 ULONG zeros[4] = {0, 0, 0, 0};
180 ULONG ones[4] = {0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000};
182 "movups (%0), %%xmm0\n"
183 "movups (%1), %%xmm1\n"
185 "divps %%xmm0, %%xmm1\n"
187 : :
"r"(&zeros),
"r"(&ones) :
"xmm0",
"xmm1"
LONG WINAPI Filter1(LPEXCEPTION_POINTERS p)
static VOID TestSetUnhandledExceptionFilter(VOID)
static BOOL ExceptionCaught
static LONG WINAPI ExceptionFilterSSESupport(LPEXCEPTION_POINTERS exp)
LONG WINAPI Filter2(LPEXCEPTION_POINTERS p)
static VOID TestSSEExceptions(VOID)
static LONG WINAPI ExceptionFilterSSEException(LPEXCEPTION_POINTERS exp)
LPTOP_LEVEL_EXCEPTION_FILTER WINAPI DECLSPEC_HOTPATCH SetUnhandledExceptionFilter(IN LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter)
#define EXCEPTION_EXECUTE_HANDLER
#define EXCEPTION_CONTINUE_EXECUTION
#define STATUS_FLOAT_DIVIDE_BY_ZERO
#define STATUS_FLOAT_MULTIPLE_TRAPS
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
static void push(calc_node_t *op)
PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER
#define EXCEPTION_ILLEGAL_INSTRUCTION
void _mm_setcsr(unsigned int a)
__m128 _mm_div_ps(__m128 a, __m128 b)
unsigned int _mm_getcsr(void)