yarv-diff:58
From: ko1 atdot.net
Date: 28 Jul 2005 12:38:24 -0000
Subject: [yarv-diff:58] r213 - trunk
Author: ko1
Date: 2005-07-28 21:38:24 +0900 (Thu, 28 Jul 2005)
New Revision: 213
Modified:
trunk/ChangeLog
trunk/vm.h
trunk/vm_evalbody.h
trunk/yarvcore.c
Log:
* yarvcore.c : add another mark function for thread/stack
* vm_evalbody.h : fix register allocation for x86_64
* vm.h : use asm for tc on x86_64
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2005-07-28 11:19:23 UTC (rev 212)
+++ trunk/ChangeLog 2005-07-28 12:38:24 UTC (rev 213)
@@ -4,6 +4,15 @@
# from Mon, 03 May 2004 01:24:19 +0900
#
+2005-07-28(Thu) 21:35:09 +0900 Koichi Sasada <ko1 atdot.net>
+
+ * yarvcore.c : add another mark function for thread/stack
+
+ * vm_evalbody.h : fix register allocation for x86_64
+
+ * vm.h : use asm for tc on x86_64
+
+
2005-07-28(Thu) 20:17:09 +0900 Koichi Sasada <ko1 atdot.net>
* yarvcore.c : add mark/free message to debug gc
Modified: trunk/vm.h
===================================================================
--- trunk/vm.h 2005-07-28 11:19:23 UTC (rev 212)
+++ trunk/vm.h 2005-07-28 12:38:24 UTC (rev 213)
@@ -104,7 +104,7 @@
INSN_ENTRY_SIG(insn); \
/* dispather */
-#if __GNUC__ && __i386__ && __GNUC__ == 3
+#if __GNUC__ && (__i386__ || __x86_64__) && __GNUC__ == 3
#define DISPATCH_ARCH_DEPEND_WAY(addr) \
asm volatile("jmp *%0;\t# -- inseted by vm.h\t[length = 2]" : : "r" (addr))
Modified: trunk/vm_evalbody.h
===================================================================
--- trunk/vm_evalbody.h 2005-07-28 11:19:23 UTC (rev 212)
+++ trunk/vm_evalbody.h 2005-07-28 12:38:24 UTC (rev 213)
@@ -34,10 +34,14 @@
DECL_SC_REG(yarv_control_frame_t *, cfp, "si");
#define USE_MACHINE_REGS 1
-#elif __GNUC__ && __AMD64__
+#elif __GNUC__ && __x86_64__
DECL_SC_REG(VALUE *, pc, "14");
DECL_SC_REG(yarv_control_frame_t *, cfp, "15");
#define USE_MACHINE_REGS 1
+
+#else
+ register yarv_control_frame_t *reg_cfp;
+ VALUE *reg_pc;
#endif
#if USE_MACHINE_REGS
Modified: trunk/yarvcore.c
===================================================================
--- trunk/yarvcore.c 2005-07-28 11:19:23 UTC (rev 212)
+++ trunk/yarvcore.c 2005-07-28 12:38:24 UTC (rev 213)
@@ -497,11 +497,16 @@
if(ptr){
th = ptr;
if(th->stack){
- VALUE *p = th->stack;
- VALUE *sp = th->cfp->sp;
- while(p < sp){
- rb_gc_mark(*p++);
+ if(0){
+ rb_gc_mark_locations(th->stack, th->cfp->sp);
}
+ else{
+ VALUE *p = th->stack;
+ VALUE *sp = th->cfp->sp;
+ while(p < sp){
+ rb_gc_mark(*p++);
+ }
+ }
}
/* mark ruby objects */
--
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml