summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 13:36:22 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 13:36:22 +0200
commit29be14a4aa2f73bf89396e50e5f5322fa9264b00 (patch)
tree85fb9a7aa0e14ef35f73be40b00e0aedcb37cf96 /mark_rts.c
parente955362cfcef47fdc3ad2140f50ea4638fd86a4d (diff)
gc5.3 tarball importgc5_3
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/mark_rts.c b/mark_rts.c
index 2f21ed3..5bafd07 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -412,6 +412,8 @@ ptr_t cold_gc_frame;
if (0 == cold_gc_frame) return;
# ifdef STACK_GROWS_DOWN
GC_push_all_eager(GC_approx_sp(), cold_gc_frame);
+ /* For IA64, the register stack backing store is handled */
+ /* in the thread-specific code. */
# else
GC_push_all_eager( cold_gc_frame, GC_approx_sp() );
# endif
@@ -419,6 +421,31 @@ ptr_t cold_gc_frame;
# ifdef STACK_GROWS_DOWN
GC_push_all_stack_partially_eager( GC_approx_sp(), GC_stackbottom,
cold_gc_frame );
+# ifdef IA64
+ /* We also need to push the register stack backing store. */
+ /* This should really be done in the same way as the */
+ /* regular stack. For now we fudge it a bit. */
+ /* Note that the backing store grows up, so we can't use */
+ /* GC_push_all_stack_partially_eager. */
+ {
+ extern word GC_save_regs_ret_val;
+ /* Previously set to backing store pointer. */
+ ptr_t bsp = (ptr_t) GC_save_regs_ret_val;
+ ptr_t cold_gc_bs_pointer;
+# ifdef ALL_INTERIOR_POINTERS
+ cold_gc_bs_pointer = bsp - 2048;
+ if (cold_gc_bs_pointer < BACKING_STORE_BASE) {
+ cold_gc_bs_pointer = BACKING_STORE_BASE;
+ }
+ GC_push_all(BACKING_STORE_BASE, cold_gc_bs_pointer);
+# else
+ cold_gc_bs_pointer = BACKING_STORE_BASE;
+# endif
+ GC_push_all_eager(cold_gc_bs_pointer, bsp);
+ /* All values should be sufficiently aligned that we */
+ /* dont have to worry about the boundary. */
+ }
+# endif
# else
GC_push_all_stack_partially_eager( GC_stackbottom, GC_approx_sp(),
cold_gc_frame );
@@ -477,6 +504,9 @@ ptr_t cold_gc_frame;
/* In the USE_GENERIC_PUSH_REGS case, this is done inside */
/* GC_push_regs, so that we catch callee-save registers saved */
/* inside the GC_push_regs frame. */
+ /* In the case of linux threads on Ia64, the hot section of */
+ /* the main stack is marked here, but the register stack */
+ /* backing store is handled in the threads-specific code. */
# endif
if (GC_push_other_roots != 0) (*GC_push_other_roots)();
/* In the threads case, this also pushes thread stacks. */