#define PRINTNOISE
-#if defined(LISP_FEATURE_X86)
-/* again, what's so special about the x86 that this is differently
- * visible there than on other platforms? -dan 20010125
+#if defined(LISP_FEATURE_GENCGC)
+/* this is another artifact of the poor integration between gencgc and
+ * the rest of the runtime: on cheney gc there is a global
+ * dynamic_space_free_pointer which is valid whenever foreign function
+ * call is active, but in gencgc there's no such variable and we have
+ * to keep our own
*/
static lispobj *dynamic_space_free_pointer;
#endif
} *later_blocks = NULL;
static int later_count = 0;
-#define CEILING(x,y) (((x) + ((y) - 1)) & (~((y) - 1)))
-#define NWORDS(x,y) (CEILING((x),(y)) / (y))
-
/* FIXME: Shouldn't this be defined in sbcl.h? See also notes in
* cheneygc.c */
case SIMPLE_BASE_STRING_WIDETAG:
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length)+1,4)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length)+1,8)+2,2);
break;
case SIMPLE_BIT_VECTOR_WIDETAG:
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),32)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),1)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_2_WIDETAG:
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),16)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),2)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_4_WIDETAG:
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),8)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),4)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_8_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_7_WIDETAG:
#endif
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),4)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),8)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_16_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_15_WIDETAG:
#endif
vector = (struct vector *)addr;
- count = CEILING(NWORDS(fixnum_value(vector->length),2)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),16)+2,2);
break;
case SIMPLE_ARRAY_UNSIGNED_BYTE_32_WIDETAG:
case SIMPLE_ARRAY_UNSIGNED_BYTE_31_WIDETAG:
#endif
vector = (struct vector *)addr;
- count = CEILING(fixnum_value(vector->length)+2,2);
+ count = CEILING(NWORDS(fixnum_value(vector->length),32)+2,2);
+ break;
+
+#if N_WORD_BITS == 64
+ case SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG:
+#ifdef SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG
+ case SIMPLE_ARRAY_SIGNED_BYTE_61_WIDETAG:
+ case SIMPLE_ARRAY_UNSIGNED_BYTE_60_WIDETAG:
+#endif
+#ifdef SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG
+ case SIMPLE_ARRAY_SIGNED_BYTE_64_WIDETAG:
+ case SIMPLE_ARRAY_UNSIGNED_BYTE_63_WIDETAG:
+#endif
+ vector = (struct vector *)addr;
+ count = CEILING(NWORDS(fixnum_value(vector->length),64)+2,2);
break;
+#endif
case SIMPLE_ARRAY_SINGLE_FLOAT_WIDETAG:
vector = (struct vector *)addr;
SetSymbolValue(READ_ONLY_SPACE_FREE_POINTER, (lispobj)read_only_free,0);
SetSymbolValue(STATIC_SPACE_FREE_POINTER, (lispobj)static_free,0);
-#if !defined(LISP_FEATURE_X86)
+#if !defined(ALLOCATION_POINTER)
dynamic_space_free_pointer = current_dynamic_space;
set_auto_gc_trigger(bytes_consed_between_gcs);
#else