X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fx86-assem.S;h=4a5090ce9606c646d58564223dd016b09123da24;hb=72751b72bf505f2fbb92c3bb4de906e713f5eba8;hp=db4ee9498daada75e9f3e3bd7a28abf4e438207a;hpb=54c6201a190414c4aef1a52b8fd261fc3dfe981b;p=sbcl.git diff --git a/src/runtime/x86-assem.S b/src/runtime/x86-assem.S index db4ee94..4a5090c 100644 --- a/src/runtime/x86-assem.S +++ b/src/runtime/x86-assem.S @@ -122,15 +122,12 @@ GNAME(call_into_c): fstp %st(0) fstp %st(0) - cld # clear out DF: Darwin, Solaris and Win32 at - # least need this, and it should not hurt others - call *%eax # normal callout using Lisp stack movl %eax,%ecx # remember integer return value /* Check for a return FP value. */ fxam - fnstsw %eax + fnstsw %ax andl $0x4500,%eax cmpl $0x4100,%eax jne Lfp_rtn_value @@ -188,10 +185,8 @@ GNAME(call_into_lisp_first_time): #ifndef LISP_FEATURE_WIN32 movl %esp,ALIEN_STACK + SYMBOL_VALUE_OFFSET movl GNAME(all_threads),%eax - movl THREAD_CONTROL_STACK_START_OFFSET(%eax) ,%esp - /* don't think too hard about what happens if we get interrupted - * here */ - addl $(THREAD_CONTROL_STACK_SIZE),%esp + /* pthread machinery takes care of this for other threads */ + movl THREAD_CONTROL_STACK_END_OFFSET(%eax) ,%esp #else /* Win32 -really- doesn't like you switching stacks out from under it. */ movl GNAME(all_threads),%eax @@ -440,17 +435,15 @@ GNAME(do_pending_interrupt): #define ALLOC(size) \ pushl %ebp; /* Save EBP */ \ movl %esp,%ebp; /* Save ESP to EBP */ \ - andl $0xfffffff0,%esp; /* Align stack */ \ - pushl $0; /* Padding */ \ - pushl size; /* Argument to alloc */ \ - cld; /* Clear DF */ \ + pushl $0; /* Reserve space for arg */ \ + andl $0xfffffff0,%esp; /* Align stack to 16bytes */ \ + movl size, (%esp); /* Argument to alloc */ \ call GNAME(alloc); \ movl %ebp,%esp; /* Restore ESP from EBP */ \ popl %ebp; /* Restore EBP */ #else #define ALLOC(size) \ pushl size; /* Argument to alloc */ \ - cld; /* Clear DF */ \ call GNAME(alloc); \ addl $4,%esp; /* Pop argument */ #endif @@ -872,7 +865,6 @@ GNAME(fast_bzero_base): xor %eax, %eax /* Zero EAX */ shr $2, %ecx /* Amount of 4-byte blocks to copy */ jz Lend_base - cld /* Set direction of STOSL to increment */ rep stosl /* Store EAX to *EDI, ECX times, incrementing @@ -887,4 +879,3 @@ Lend_base: END() - \ No newline at end of file