* 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
#endif
/* Alloc new frame. */
- mov %esp,%ebx # The current sp marks start of new frame.
- push %ebp # dummy for return address
+ 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.
- mov %ebx,%ebp # Switch to new frame.
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