ruby-changes:13716
From: naruse <ko1@a...>
Date: Tue, 27 Oct 2009 10:29:37 +0900 (JST)
Subject: [ruby-changes:13716] Ruby:r25507 (trunk): * gc.c (SET_MACHINE_STACK_END): add x86_64 version by nobu.
naruse 2009-10-27 10:29:22 +0900 (Tue, 27 Oct 2009) New Revision: 25507 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25507 Log: * gc.c (SET_MACHINE_STACK_END): add x86_64 version by nobu. Modified files: trunk/ChangeLog trunk/gc.h Index: ChangeLog =================================================================== --- ChangeLog (revision 25506) +++ ChangeLog (revision 25507) @@ -1,3 +1,7 @@ +Tue Oct 27 09:40:55 2009 NARUSE, Yui <naruse@r...> + + * gc.c (SET_MACHINE_STACK_END): add x86_64 version by nobu. + Tue Oct 27 09:27:59 2009 NARUSE, Yui <naruse@r...> * vm_exec.c (DECL_SC_REG): use __clang__. @@ -27,7 +31,7 @@ Tue Oct 27 05:11:49 2009 NARUSE, Yui <naruse@r...> * vm_exec.c (DECL_SC_REG): check defined(__asm__) before use it. - LLVM/clang defines __GNUC__ but doesn't have __asm__.. + LLVM/clang defines __GNUC__ but doesn't have __asm__. Tue Oct 27 03:45:39 2009 Nobuyoshi Nakada <nobu@r...> Index: gc.h =================================================================== --- gc.h (revision 25506) +++ gc.h (revision 25507) @@ -2,7 +2,9 @@ #ifndef RUBY_GC_H #define RUBY_GC_H 1 -#if defined(__i386) && defined(__GNUC__) +#if defined(__x86_64__) && defined(__GNUC__) +#define SET_MACHINE_STACK_END(p) __asm__("mov %%rsp, %0" : "=r" (*p)) +#elif defined(__i386) && defined(__GNUC__) #define SET_MACHINE_STACK_END(p) __asm__("mov %%esp, %0" : "=r" (*p)) #else NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p)); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/