x86 uses the first constant for the fixup vector, x86-64 doesn't.
Don't leave empty space in ir2-component-constants.
On the C side, call gencgc_apply_code_fixups only on x86, and not on
x86_64 as well, since its body is conditionalized for x86_64 anyway.
;;;; -*- coding: utf-8; fill-column: 78 -*-
changes relative to sbcl-1.1.8:
* enchancement: disassemble now annotates some previously missing static
- function, like LENGTH.
+ functions, like LENGTH.
changes in sbcl-1.1.8 relative to sbcl-1.1.7:
* notice: The implementation of MAP-ALLOCATED-OBJECTS (the heart of
;;; additional noise in the code object header.
(!def-vm-support-routine select-component-format (component)
(declare (type component component))
- ;; The 1+ here is because for the x86 the first constant is a
- ;; pointer to a list of fixups, or NIL if the code object has none.
- ;; (If I understand correctly, the fixups are needed at GC copy
- ;; time because the X86 code isn't relocatable.)
- ;;
- ;; KLUDGE: It'd be cleaner to have the fixups entry be a named
- ;; element of the CODE (aka component) primitive object. However,
- ;; it's currently a large, tricky, error-prone chore to change
- ;; the layout of any primitive object, so for the foreseeable future
- ;; we'll just live with this ugliness. -- WHN 2002-01-02
- (dotimes (i (1+ code-constants-offset))
+ (dotimes (i code-constants-offset)
(vector-push-extend nil
(ir2-component-constants (component-info component))))
(values))
#endif
-#if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)
+#ifdef LISP_FEATURE_X86
gencgc_apply_code_fixups(code, new_code);
#endif
\f
/* forward declarations */
-
+#ifdef LISP_FEATURE_X86
void sniff_code_object(struct code *code, os_vm_size_t displacement);
void gencgc_apply_code_fixups(struct code *old_code, struct code *new_code);
+#endif
sword_t update_dynamic_space_free_pointer(void);
void gc_alloc_update_page_tables(int page_type_flag, struct alloc_region *alloc_region);
* during a heap verify? */
boolean verify_dynamic_code_check = 0;
+#ifdef LISP_FEATURE_X86
/* Should we check code objects for fixup errors after they are transported? */
boolean check_code_fixups = 0;
+#endif
/* Should we check that newly allocated regions are zero filled? */
boolean gencgc_zero_check = 0;
*
* Currently only absolute fixups to the constant vector, or to the
* code area are checked. */
+#ifdef LISP_FEATURE_X86
void
sniff_code_object(struct code *code, os_vm_size_t displacement)
{
-#ifdef LISP_FEATURE_X86
sword_t nheader_words, ncode_words, nwords;
os_vm_address_t constants_start_addr = NULL, constants_end_addr, p;
os_vm_address_t code_start_addr, code_end_addr;
"/code start = %x, end = %x\n",
code_start_addr, code_end_addr));
}
-#endif
}
+#endif
+#ifdef LISP_FEATURE_X86
void
gencgc_apply_code_fixups(struct code *old_code, struct code *new_code)
{
-/* x86-64 uses pc-relative addressing instead of this kludge */
-#ifndef LISP_FEATURE_X86_64
sword_t nheader_words, ncode_words, nwords;
os_vm_address_t constants_start_addr, constants_end_addr;
os_vm_address_t code_start_addr, code_end_addr;
if (check_code_fixups) {
sniff_code_object(new_code,displacement);
}
-#endif
}
-
+#endif
static lispobj
trans_boxed_large(lispobj object)