From 68c6bb997dab1f5bd29ace69806d5b55d8ec71c1 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 13 Jun 2007 13:42:02 +0000 Subject: [PATCH] * gc.c (garbage_collect): update IA64 register stack code. [ruby-dev:30971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ gc.c | 24 ++---------------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74b816237a..377012a21c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 13 22:42:06 2007 Yukihiro Matsumoto + + * gc.c (garbage_collect): update IA64 register stack code. + [ruby-dev:30971] + Wed Jun 13 06:05:12 2007 Nobuyoshi Nakada * configure.in (darwin): prohibit loading extension libraries to diff --git a/gc.c b/gc.c index 4ea96efe20..2bb1a01c16 100644 --- a/gc.c +++ b/gc.c @@ -1385,29 +1385,9 @@ garbage_collect(void) rb_gc_mark_locations(th->machine_stack_start, th->machine_stack_end + 1); #endif #ifdef __ia64__ - /* mark backing store (flushed register window on the stack) */ + /* mark backing store (flushed register stack) */ /* the basic idea from guile GC code */ - { - ucontext_t ctx; - VALUE *top, *bot; -#if defined(HAVE_UNWIND_H) && defined(HAVE__UNW_CREATECONTEXTFORSELF) - _Unwind_Context *unwctx = _UNW_createContextForSelf(); -#endif - - getcontext(&ctx); - mark_locations_array((VALUE*)&ctx.uc_mcontext, - ((size_t)(sizeof(VALUE)-1 + sizeof ctx.uc_mcontext)/sizeof(VALUE))); -#if defined(HAVE_UNWIND_H) && defined(HAVE__UNW_CREATECONTEXTFORSELF) - _UNW_currentContext(unwctx); - bot = (VALUE*)(long)_UNW_getAR(unwctx, _UNW_AR_BSP); - top = (VALUE*)(long)_UNW_getAR(unwctx, _UNW_AR_BSPSTORE); - _UNW_destroyContext(unwctx); -#else - bot = (VALUE*)__libc_ia64_register_backing_store_base; - top = (VALUE*)ctx.uc_mcontext.IA64_BSPSTORE; -#endif - rb_gc_mark_locations(bot, top); - } + rb_gc_mark_locations(rb_gc_register_stack_start, (VALUE*)rb_ia64_bsp()); #endif #if defined(__human68k__) || defined(__mc68000__) rb_gc_mark_locations((VALUE*)((char*)STACK_END + 2),