Commit 69bb29ce authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Add call frame annotations in x86 assembly code.

parent 0c463415
...@@ -283,26 +283,35 @@ static const CALLFROM16 *get_entry_point( STACK16FRAME *frame, LPSTR module, LPS ...@@ -283,26 +283,35 @@ static const CALLFROM16 *get_entry_point( STACK16FRAME *frame, LPSTR module, LPS
extern int call_entry_point( void *func, int nb_args, const int *args ); extern int call_entry_point( void *func, int nb_args, const int *args );
__ASM_GLOBAL_FUNC( call_entry_point, __ASM_GLOBAL_FUNC( call_entry_point,
"\tpushl %ebp\n" "pushl %ebp\n\t"
"\tmovl %esp,%ebp\n" __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
"\tpushl %esi\n" __ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
"\tpushl %edi\n" "movl %esp,%ebp\n\t"
"\tmovl 12(%ebp),%edx\n" __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
"\tshll $2,%edx\n" "pushl %esi\n\t"
"\tjz 1f\n" __ASM_CFI(".cfi_rel_offset %esi,-4\n\t")
"\tsubl %edx,%esp\n" "pushl %edi\n\t"
"\tandl $~15,%esp\n" __ASM_CFI(".cfi_rel_offset %edi,-8\n\t")
"\tmovl 12(%ebp),%ecx\n" "movl 12(%ebp),%edx\n\t"
"\tmovl 16(%ebp),%esi\n" "shll $2,%edx\n\t"
"\tmovl %esp,%edi\n" "jz 1f\n\t"
"\tcld\n" "subl %edx,%esp\n\t"
"\trep; movsl\n" "andl $~15,%esp\n\t"
"1:\tcall *8(%ebp)\n" "movl 12(%ebp),%ecx\n\t"
"\tleal -8(%ebp),%esp\n" "movl 16(%ebp),%esi\n\t"
"\tpopl %edi\n" "movl %esp,%edi\n\t"
"\tpopl %esi\n" "cld\n\t"
"\tpopl %ebp\n" "rep; movsl\n"
"\tret" ) "1:\tcall *8(%ebp)\n\t"
"leal -8(%ebp),%esp\n\t"
"popl %edi\n\t"
__ASM_CFI(".cfi_same_value %edi\n\t")
"popl %esi\n\t"
__ASM_CFI(".cfi_same_value %esi\n\t")
"popl %ebp\n\t"
__ASM_CFI(".cfi_def_cfa %esp,4\n\t")
__ASM_CFI(".cfi_same_value %ebp\n\t")
"ret" )
/*********************************************************************** /***********************************************************************
......
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