From: Aleksey Demakov Date: Thu, 25 Jan 2007 20:55:53 +0000 (+0000) Subject: remove stack frame set up and restore instructions from redirector X-Git-Tag: before.move.to.git~160 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=5630eb60fbb352838e194ae37026f376cc3f5730;p=francis%2Flibjit.git remove stack frame set up and restore instructions from redirector --- diff --git a/ChangeLog b/ChangeLog index d75a7d8..497d5e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-01-26 Aleksey Demakov + + * jit/jit-apply-x86.c (_jit_create_redirector): redirector does not + use stack frame so remove frame set up and restore instructions. + 2007-01-23 Aleksey Demakov * jit/jit-internal.h, jit/jit-function.c: remove the closure_entry diff --git a/jit/jit-apply-x86.c b/jit/jit-apply-x86.c index ab87f7a..33548f7 100644 --- a/jit/jit-apply-x86.c +++ b/jit/jit-apply-x86.c @@ -170,10 +170,6 @@ void *_jit_create_redirector(unsigned char *buf, void *func, { void *start = (void *)buf; - /* Set up a new stack frame */ - x86_push_reg(buf, X86_EBP); - x86_mov_reg_reg(buf, X86_EBP, X86_ESP, 4); - /* Save the fastcall registers, if necessary */ #if JIT_APPLY_X86_FASTCALL == 1 if(abi == (int)jit_abi_fastcall) @@ -201,9 +197,6 @@ void *_jit_create_redirector(unsigned char *buf, void *func, } #endif - /* Restore the value of EBP */ - x86_pop_reg(buf, X86_EBP); - /* Jump to the function that the redirector indicated */ x86_jump_reg(buf, X86_EAX); diff --git a/jit/jit-apply-x86.h b/jit/jit-apply-x86.h index d03949b..677129f 100644 --- a/jit/jit-apply-x86.h +++ b/jit/jit-apply-x86.h @@ -346,7 +346,7 @@ * The number of bytes that are needed for a redirector stub. * This includes any extra bytes that are needed for alignment. */ -#define jit_redirector_size 32 +#define jit_redirector_size 24 /* * The number of bytes that are needed for a indirector stub.