summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
63fcb94)
merged Dan Barlow's patches sbcl-devel 2001-05-08 and
2001-05-09
ltf=`pwd`/local-target-features.lisp-expr
echo //initializing $ltf
ltf=`pwd`/local-target-features.lisp-expr
echo //initializing $ltf
-echo '; This is a machine-generated file and should not be edited by hand.' > $ltf
+echo ';;;; This is a machine-generated file.' > $ltf
+echo ';;;; Please do not edit it by hand.' > $ltf
+echo ';;;; See make-config.sh.' > $ltf
-echo '//setting up "target"-named symlinks to designate target architecture'
+echo //setting up CPU-architecture-dependent information
# Currently supported: x86 alpha
# Currently supported: x86 alpha
+sbcl_arch=${SBCL_ARCH:-x86}
echo -n ":$sbcl_arch" >> $ltf
for d in src/compiler src/assembly; do
echo //setting up symlink $d/target
echo -n ":$sbcl_arch" >> $ltf
for d in src/compiler src/assembly; do
echo //setting up symlink $d/target
sb!vm::nfp-offset))
#!-alpha
(sap-ref-sap fp
sb!vm::nfp-offset))
#!-alpha
(sap-ref-sap fp
- (* sb!vm::nfp-save-offset
- sb!vm:word-bytes))
+ (* sb!vm::nfp-save-offset
+ sb!vm:word-bytes))
- (%alpha::make-number-stack-pointer
+ (sb!vm::make-number-stack-pointer
- (* sb!vm::nfp-save-offset
- sb!vm:word-bytes))))))
+ (* sb!vm::nfp-save-offset
+ sb!vm:word-bytes))))))
,@body)))
(ecase (sb!c:sc-offset-scn sc-offset)
((#.sb!vm:any-reg-sc-number
,@body)))
(ecase (sb!c:sc-offset-scn sc-offset)
((#.sb!vm:any-reg-sc-number
#define CEILING(x,y) (((x) + ((y) - 1)) & (~((y) - 1)))
\f
#define CEILING(x,y) (((x) + ((y) - 1)) & (~((y) - 1)))
\f
#if defined(DEBUG_SPACE_PREDICATES)
#if defined(DEBUG_SPACE_PREDICATES)
-boolean from_space_p(lispobj object)
+boolean
+from_space_p(lispobj object)
(ptr < from_space_free_pointer));
}
(ptr < from_space_free_pointer));
}
-boolean new_space_p(lispobj object)
+boolean
+new_space_p(lispobj object)
static lispobj
copy_object(lispobj object, int nwords)
static lispobj
copy_object(lispobj object, int nwords)
+/* collecting garbage */
-static double tv_diff(struct timeval *x, struct timeval *y)
+static double
+tv_diff(struct timeval *x, struct timeval *y)
{
return (((double) x->tv_sec + (double) x->tv_usec * 1.0e-6) -
((double) y->tv_sec + (double) y->tv_usec * 1.0e-6));
{
return (((double) x->tv_sec + (double) x->tv_usec * 1.0e-6) -
((double) y->tv_sec + (double) y->tv_usec * 1.0e-6));
#else
#define U32 unsigned long
#endif
#else
#define U32 unsigned long
#endif
-static void zero_stack(void)
+static void
+zero_stack(void)
{
U32 *ptr = (U32 *)current_control_stack_pointer;
search:
{
U32 *ptr = (U32 *)current_control_stack_pointer;
search:
-/* this is not generational. It's called with a last_gen arg, which we shun.
- */
-
-void collect_garbage(unsigned ignore)
+/* Note: The generic GC interface we're implementing passes us a
+ * last_generation argument. That's meaningless for us, since we're
+ * not a generational GC. So we ignore it. */
+void
+collect_garbage(unsigned ignore)
{
#ifdef PRINTNOISE
struct timeval start_tv, stop_tv;
{
#ifdef PRINTNOISE
struct timeval start_tv, stop_tv;
from_space_free_pointer = (lispobj *)SymbolValue(ALLOCATION_POINTER);
#endif
from_space_free_pointer = (lispobj *)SymbolValue(ALLOCATION_POINTER);
#endif
fprintf(stderr,"from_space = %lx\n",
(unsigned long) current_dynamic_space);
fprintf(stderr,"from_space = %lx\n",
(unsigned long) current_dynamic_space);
if (current_dynamic_space == (lispobj *) DYNAMIC_0_SPACE_START)
new_space = (lispobj *)DYNAMIC_1_SPACE_START;
else if (current_dynamic_space == (lispobj *) DYNAMIC_1_SPACE_START)
if (current_dynamic_space == (lispobj *) DYNAMIC_0_SPACE_START)
new_space = (lispobj *)DYNAMIC_1_SPACE_START;
else if (current_dynamic_space == (lispobj *) DYNAMIC_1_SPACE_START)
gc_assert(nwords == 0);
}
gc_assert(nwords == 0);
}
-static void scavenge_newspace(void)
+static void
+scavenge_newspace(void)
}
/* printf("done with newspace\n"); */
}
}
/* printf("done with newspace\n"); */
}
-/* Scavenging Interrupt Contexts */
+/* scavenging interrupt contexts */
static int boxed_registers[] = BOXED_REGISTERS;
static int boxed_registers[] = BOXED_REGISTERS;
-static void scavenge_interrupt_context(os_context_t *context)
+static void
+scavenge_interrupt_context(os_context_t *context)
os_context_t *context;
index = fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX));
os_context_t *context;
index = fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX));
- printf("Number of active contexts: %d\n", index);
for (i = 0; i < index; i++) {
context = lisp_interrupt_contexts[i];
for (i = 0; i < index; i++) {
context = lisp_interrupt_contexts[i];
-void print_garbage(lispobj *from_space, lispobj *from_space_free_pointer)
+void
+print_garbage(lispobj *from_space, lispobj *from_space_free_pointer)
{
lispobj *start;
int total_words_not_copied;
{
lispobj *start;
int total_words_not_copied;
-/* Code and Code-Related Objects */
+/* code and code-related objects */
#define RAW_ADDR_OFFSET (6*sizeof(lispobj) - type_FunctionPointer)
#define RAW_ADDR_OFFSET (6*sizeof(lispobj) - type_FunctionPointer)
#if DIRECT_SCAV
static int
#if DIRECT_SCAV
static int
static lispobj trans_list(lispobj object);
static lispobj trans_list(lispobj object);
-/* Scavenging and Transporting Other Pointers */
+/* scavenging and transporting other pointers */
#if DIRECT_SCAV
static int
#if DIRECT_SCAV
static int
-/* Immediate, Boxed, and Unboxed Objects */
+/* immediate, boxed, and unboxed objects */
static int
size_pointer(lispobj *where)
static int
size_pointer(lispobj *where)
}
/* Note: on the sparc we don't have to do anything special for fdefns, */
}
/* Note: on the sparc we don't have to do anything special for fdefns, */
-/* cause the raw-addr has a function lowtag. */
+/* 'cause the raw-addr has a function lowtag. */
#ifndef sparc
static int
scav_fdefn(lispobj *where, lispobj object)
#ifndef sparc
static int
scav_fdefn(lispobj *where, lispobj object)
-/* Vector-Like Objects */
+/* vector-like objects */
#define NWORDS(x,y) (CEILING((x),(y)) / (y))
#define NWORDS(x,y) (CEILING((x),(y)) / (y))
#define WEAK_POINTER_NWORDS \
CEILING((sizeof(struct weak_pointer) / sizeof(lispobj)), 2)
#define WEAK_POINTER_NWORDS \
CEILING((sizeof(struct weak_pointer) / sizeof(lispobj)), 2)
static int
scav_lose(lispobj *where, lispobj object)
static int
scav_lose(lispobj *where, lispobj object)
+/* KLUDGE: SBCL already has two GC implementations, and if someday the
+ * precise generational GC is revived, it might have three. It would
+ * be nice to share the scavtab[] data set up here, and perhaps other
+ * things too, between all of them, rather than trying to maintain
+ * multiple copies. -- WHN 2001-05-09 */
+void
+gc_init(void)
for (i = 0; i < 256; i++)
scavtab[i] = scav_lose;
/* scavtab[i] = scav_immediate; */
for (i = 0; i < 256; i++)
scavtab[i] = scav_lose;
/* scavtab[i] = scav_immediate; */
sizetab[type_InstanceHeader] = size_boxed;
sizetab[type_Fdefn] = size_boxed;
}
sizetab[type_InstanceHeader] = size_boxed;
sizetab[type_Fdefn] = size_boxed;
}
-/* Noise to manipulate the gc trigger stuff. */
+/* noise to manipulate the gc trigger stuff */
;;; versions, and a string like "0.6.5.12" is used for versions which
;;; aren't released but correspond only to CVS tags or snapshots.
;;; versions, and a string like "0.6.5.12" is used for versions which
;;; aren't released but correspond only to CVS tags or snapshots.