* for this instruction in the SIGILL handler and if we see it, we
* advance the EIP by two bytes to skip over ud2 instruction and
* call sigtrap_handler. */
-#if defined(LISP_FEATURE_DARWIN)
+#if defined(LISP_FEATURE_UD2_BREAKPOINTS)
#define END()
#define TRAP ud2
#else
.globl GNAME(call_into_lisp_first_time)
TYPE(GNAME(call_into_lisp_first_time))
-/* The *ALIEN-STACK* pointer is set up on the first call_into_lisp when
- * the stack changes. We don't worry too much about saving registers
+/* We don't worry too much about saving registers
* here, because we never expect to return from the initial call to lisp
* anyway */
pushl %ebp # Save old frame pointer.
movl %esp,%ebp # Establish new frame.
#ifndef LISP_FEATURE_WIN32
- movl %esp,ALIEN_STACK + SYMBOL_VALUE_OFFSET
movl GNAME(all_threads),%eax
/* pthread machinery takes care of this for other threads */
movl THREAD_CONTROL_STACK_END_OFFSET(%eax) ,%esp
#endif
/* Alloc new frame. */
- mov %esp,%ebx # The current sp marks start of new frame.
- push %ebp # fp in save location S0
- sub $8,%esp # Ensure 3 slots are allocated, one above.
- mov %ebx,%ebp # Switch to new frame.
+ push %ebp # Dummy for return address
+ push %ebp # fp in save location S1
+ mov %esp,%ebp # The current sp marks start of new frame.
+ sub $4,%esp # Ensure 3 slots are allocated, two above.
call *CLOSURE_FUN_OFFSET(%eax)
TYPE(GNAME(undefined_tramp))
.byte 0, 0, 0, SIMPLE_FUN_HEADER_WIDETAG
GNAME(undefined_tramp):
+ pop 4(%ebp) # Save return PC for backtrace.
TRAP
.byte trap_Error
.byte 2