projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.4.25: 16 byte align asm functions
[sbcl.git]
/
src
/
runtime
/
purify.c
diff --git
a/src/runtime/purify.c
b/src/runtime/purify.c
index
56ec207
..
91b4232
100644
(file)
--- a/
src/runtime/purify.c
+++ b/
src/runtime/purify.c
@@
-37,8
+37,6
@@
#define PRINTNOISE
#define PRINTNOISE
-extern unsigned long bytes_consed_between_gcs;
-
static lispobj *dynamic_space_purify_pointer;
\f
static lispobj *dynamic_space_purify_pointer;
\f
@@
-70,14
+68,6
@@
static long later_count = 0;
#define SIMPLE_ARRAY_WORD_WIDETAG SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG
#endif
#define SIMPLE_ARRAY_WORD_WIDETAG SIMPLE_ARRAY_UNSIGNED_BYTE_64_WIDETAG
#endif
-/* FIXME: Shouldn't this be defined in sbcl.h? See also notes in
- * cheneygc.c */
-
-#ifdef LISP_FEATURE_SPARC
-#define FUN_RAW_ADDR_OFFSET 0
-#else
-#define FUN_RAW_ADDR_OFFSET (6*sizeof(lispobj) - FUN_POINTER_LOWTAG)
-#endif
\f
static boolean
forwarding_pointer_p(lispobj obj)
\f
static boolean
forwarding_pointer_p(lispobj obj)
@@
-665,7
+655,7
@@
apply_code_fixups_during_purify(struct code *old_code, struct code *new_code)
void *constants_start_addr, *constants_end_addr;
void *code_start_addr, *code_end_addr;
lispobj fixups = NIL;
void *constants_start_addr, *constants_end_addr;
void *code_start_addr, *code_end_addr;
lispobj fixups = NIL;
- unsigned displacement = (unsigned)new_code - (unsigned)old_code;
+ unsigned long displacement = (unsigned long)new_code - (unsigned long)old_code;
struct vector *fixups_vector;
ncode_words = fixnum_value(new_code->code_size);
struct vector *fixups_vector;
ncode_words = fixnum_value(new_code->code_size);
@@
-711,21
+701,21
@@
apply_code_fixups_during_purify(struct code *old_code, struct code *new_code)
for (i=0; i<length; i++) {
unsigned offset = fixups_vector->data[i];
/* Now check the current value of offset. */
for (i=0; i<length; i++) {
unsigned offset = fixups_vector->data[i];
/* Now check the current value of offset. */
- unsigned old_value =
- *(unsigned *)((unsigned)code_start_addr + offset);
+ unsigned long old_value =
+ *(unsigned long *)((unsigned long)code_start_addr + offset);
/* If it's within the old_code object then it must be an
* absolute fixup (relative ones are not saved) */
/* If it's within the old_code object then it must be an
* absolute fixup (relative ones are not saved) */
- if ((old_value>=(unsigned)old_code)
- && (old_value<((unsigned)old_code + nwords * N_WORD_BYTES)))
+ if ((old_value>=(unsigned long)old_code)
+ && (old_value<((unsigned long)old_code + nwords * N_WORD_BYTES)))
/* So add the dispacement. */
/* So add the dispacement. */
- *(unsigned *)((unsigned)code_start_addr + offset) = old_value
+ *(unsigned long *)((unsigned long)code_start_addr + offset) = old_value
+ displacement;
else
/* It is outside the old code object so it must be a relative
* fixup (absolute fixups are not saved). So subtract the
* displacement. */
+ displacement;
else
/* It is outside the old code object so it must be a relative
* fixup (absolute fixups are not saved). So subtract the
* displacement. */
- *(unsigned *)((unsigned)code_start_addr + offset) = old_value
+ *(unsigned long *)((unsigned long)code_start_addr + offset) = old_value
- displacement;
}
}
- displacement;
}
}
@@
-810,7
+800,7
@@
ptrans_code(lispobj thing)
((struct simple_fun *)native_pointer(func))->self
+= FUN_RAW_ADDR_OFFSET;
#endif
((struct simple_fun *)native_pointer(func))->self
+= FUN_RAW_ADDR_OFFSET;
#endif
- pscav_later(&((struct simple_fun *)native_pointer(func))->name, 3);
+ pscav_later(&((struct simple_fun *)native_pointer(func))->name, 4);
}
return result;
}
return result;
@@
-1142,7
+1132,7
@@
pscav_code(struct code*code)
((struct simple_fun *)native_pointer(func))->self
+= FUN_RAW_ADDR_OFFSET;
#endif
((struct simple_fun *)native_pointer(func))->self
+= FUN_RAW_ADDR_OFFSET;
#endif
- pscav_later(&((struct simple_fun *)native_pointer(func))->name, 3);
+ pscav_later(&((struct simple_fun *)native_pointer(func))->name, 4);
}
return CEILING(nwords,2);
}
return CEILING(nwords,2);
@@
-1588,7
+1578,7
@@
purify(lispobj static_roots, lispobj read_only_roots)
#endif
os_zero((os_vm_address_t) current_dynamic_space,
#endif
os_zero((os_vm_address_t) current_dynamic_space,
- (os_vm_size_t) DYNAMIC_SPACE_SIZE);
+ (os_vm_size_t) dynamic_space_size);
/* Zero the stack. Note that the stack is also zeroed by SUB-GC
* calling SCRUB-CONTROL-STACK - this zeros the stack on the x86. */
/* Zero the stack. Note that the stack is also zeroed by SUB-GC
* calling SCRUB-CONTROL-STACK - this zeros the stack on the x86. */