From 47f77fa056212ec19699998b9f1d00a81b0e39c9 Mon Sep 17 00:00:00 2001 From: jean Date: Sat, 3 Feb 2001 10:28:28 +0000 Subject: [PATCH] oops! leave make a pop, and caller of alloca make esp = esp +16. svn path=/trunk/; revision=1595 --- reactos/lib/crtdll/stdlib/malloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/lib/crtdll/stdlib/malloc.c b/reactos/lib/crtdll/stdlib/malloc.c index c9bbefa6d34..116e38c3e0b 100644 --- a/reactos/lib/crtdll/stdlib/malloc.c +++ b/reactos/lib/crtdll/stdlib/malloc.c @@ -38,12 +38,12 @@ void *alloca(size_t s) __asm__ __volatile__( "mov %0, %%edx \n" - "popl %%ebp \n" +// "popl %%ebp \n" "leave \n" "popl %%ecx \n" "subl %%edx, %%esp \n" "movl %%esp, %%eax \n" - "addl $4, %%eax \n" + "addl $20, %%eax \n"//4 bytes + 16 bytes = arguments "push %%ecx \n" "ret \n" : @@ -70,12 +70,12 @@ void *_alloca(size_t s) __asm__ __volatile__( "mov %0, %%edx \n" - "popl %%ebp \n" +// "popl %%ebp \n" "leave \n" "popl %%ecx \n" "subl %%edx, %%esp \n" "movl %%esp, %%eax \n" - "addl $4, %%eax \n" + "addl $20, %%eax \n"//4 bytes + 16 bytes = arguments "push %%ecx \n" "ret \n" :