summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-10 07:03:36 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-10 07:03:36 +0000
commit1ce6f065b519284a5ad7135a6db77fcbe1aa778a (patch)
tree79c663a365cc039f46e51658f288538eade86658 /gc.c
parentef45458e9405c57ab4f59f648c4001ea4df30489 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index a7e272f..2b50ffa 100644
--- a/gc.c
+++ b/gc.c
@@ -905,7 +905,11 @@ rb_gc()
alloca(0);
# define STACK_END (&stack_end)
#else
+# if defined(__GNUC__)
+ VALUE *stack_end = __builtin_frame_address(0);
+# else
VALUE *stack_end = alloca(1);
+# endif
# define STACK_END (stack_end)
#endif
@@ -978,9 +982,11 @@ void
Init_stack(addr)
VALUE *addr;
{
-#ifdef __human68k__
+#if defined(__human68k__)
extern void *_SEND;
rb_gc_stack_start = _SEND;
+#elsif defined(__GNUC__)
+ rb_gc_stack_start = __builtin_frame_address(2);
#else
VALUE start;