Commit 43900dd6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntdll: Use syscall frame in x86_64 call_raise_user_exception_dispatcher implementation.

parent 0b8db612
......@@ -2148,20 +2148,10 @@ __ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
/***********************************************************************
* call_raise_user_exception_dispatcher
*/
__ASM_GLOBAL_FUNC( call_raise_user_exception_dispatcher,
"movq %gs:0x30,%rdx\n\t"
"movq 0x328(%rdx),%rax\n\t" /* amd64_thread_data()->syscall_frame */
"leaq -0x340(%rax),%r8\n\t"
"andq $~63,%r8\n\t"
"fxrstor64 (%r8)\n\t"
"movq 0x8(%rax),%rbx\n\t" /* frame->rbx */
"movq 0x20(%rax),%rsi\n\t" /* frame->rsi */
"movq 0x28(%rax),%rdi\n\t" /* frame->rdi */
"movq 0x50(%rax),%r12\n\t" /* frame->r12 */
"movq 0x98(%rax),%rbp\n\t" /* frame->rbp */
"movq $0,0x328(%rdx)\n\t"
"leaq 0xa8(%rax),%rsp\n\t"
"jmpq *%rcx" )
void WINAPI call_raise_user_exception_dispatcher( NTSTATUS (WINAPI *dispatcher)(void) )
{
amd64_thread_data()->syscall_frame->rip = (UINT64)dispatcher;
}
/***********************************************************************
......
......@@ -246,7 +246,7 @@ extern void WINAPI DECLSPEC_NORETURN call_user_apc_dispatcher( CONTEXT *context_
void (WINAPI *dispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULONG_PTR,PNTAPCFUNC) ) DECLSPEC_HIDDEN;
extern void WINAPI DECLSPEC_NORETURN call_user_exception_dispatcher( EXCEPTION_RECORD *rec, CONTEXT *context,
NTSTATUS (WINAPI *dispatcher)(EXCEPTION_RECORD*,CONTEXT*) ) DECLSPEC_HIDDEN;
extern void WINAPI DECLSPEC_NORETURN call_raise_user_exception_dispatcher( NTSTATUS (WINAPI *dispatcher)(void) ) DECLSPEC_HIDDEN;
extern void WINAPI call_raise_user_exception_dispatcher( NTSTATUS (WINAPI *dispatcher)(void) ) DECLSPEC_HIDDEN;
extern void *get_syscall_frame(void) DECLSPEC_HIDDEN;
extern void set_syscall_frame(void *frame) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment