0.9.2.39:
[sbcl.git] / src / runtime / parse.c
index 61d8a24..d007193 100644 (file)
@@ -15,8 +15,8 @@
 #include <ctype.h>
 #include <signal.h>
 
-#include "runtime.h"
 #include "sbcl.h"
+#include "runtime.h"
 
 #if defined(LISP_FEATURE_SB_LDB)
 
@@ -27,6 +27,7 @@
 #include "interrupt.h"
 #include "lispregs.h"
 #include "monitor.h"
+#include "validate.h"
 #include "arch.h"
 #include "search.h"
 #include "thread.h"
@@ -257,15 +258,12 @@ static boolean lookup_symbol(char *name, lispobj *result)
     }
 
     /* Search dynamic space. */
-    headerptr = (lispobj *)DYNAMIC_SPACE_START;
-#if !defined(__i386__)
-    count =
-       dynamic_space_free_pointer -
-       (lispobj *)DYNAMIC_SPACE_START;
+#ifndef LISP_FEATURE_GENCGC
+    headerptr = (lispobj *)current_dynamic_space;
+    count = dynamic_space_free_pointer - headerptr;
 #else
-    count =
-       (lispobj *)SymbolValue(ALLOCATION_POINTER,0) -
-       (lispobj *)DYNAMIC_SPACE_START;
+    headerptr = (lispobj *)DYNAMIC_SPACE_START;
+    count = ((lispobj *)SymbolValue(ALLOCATION_POINTER,0)) - headerptr;
 #endif
     if (search_for_symbol(name, &headerptr, &count)) {
         *result = make_lispobj(headerptr, OTHER_POINTER_LOWTAG);
@@ -295,7 +293,7 @@ parse_regnum(char *s)
 
        for (i = 0; i < NREGS ; i++)
            if (strcasecmp(s + 1, lisp_register_names[i]) == 0)
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
                return i*2;
 #else
        return i;