1.0.38.1: Fix undefined-function bug-353 tests on x86oids.
[sbcl.git] / src / runtime / x86-64-assem.S
index 79140e0..c29aceb 100644 (file)
@@ -25,7 +25,7 @@
 #include "genesis/thread.h"
        
 /* Minimize conditionalization for different OS naming schemes. */
-#if defined __linux__  || defined __FreeBSD__ || defined __OpenBSD__ || defined __sun
+#if defined __linux__  || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ || defined __sun
 #define GNAME(var) var
 #else
 #define GNAME(var) _##var
@@ -33,7 +33,7 @@
 
 /* Get the right type of alignment. Linux, FreeBSD and OpenBSD
  * want alignment in bytes. */
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__sun)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined __NetBSD__ || defined(__sun)
 #define align_4byte    4
 #define align_8byte    8
 #define align_16byte   16
@@ -67,7 +67,7 @@
  * 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 TRAP ud2
 #else
 #define TRAP int3
@@ -266,6 +266,7 @@ GNAME(fpu_restore):
        .globl  GNAME(undefined_tramp)
        TYPE(GNAME(undefined_tramp))
 GNAME(undefined_tramp):
+       pop     8(%rbp)         # Save return PC for backtrace.
        TRAP
        .byte   trap_Error
         .byte   2