[前][次][番号順一覧][スレッド一覧][生データ]

yarv-diff:38

From: ko1 atdot.net
Date: 1 Jul 2005 18:07:24 -0000
Subject: [yarv-diff:38] r193 - in trunk: . benchmark rb

Author: ko1
Date: 2005-07-02 03:07:24 +0900 (Sat, 02 Jul 2005)
New Revision: 193

Modified:
   trunk/ChangeLog
   trunk/benchmark/run.rb
   trunk/rb/asm_parse.rb
   trunk/vm_evalbody.h
Log:
	* benchmark/run.rb : fix output

	* vm_evalbody.h : add register for x86_64

	* rb/asm_parse.rb : fix to shor size and length



Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2005-07-01 18:00:17 UTC (rev 192)
+++ trunk/ChangeLog	2005-07-01 18:07:24 UTC (rev 193)
@@ -4,6 +4,15 @@
 #  from Mon, 03 May 2004 01:24:19 +0900
 #
 
+2005-07-02(Sat) 03:05:12 +0900  Koichi Sasada  <ko1 atdot.net>
+
+	* benchmark/run.rb : fix output
+
+	* vm_evalbody.h : add register for x86_64
+
+	* rb/asm_parse.rb : fix to shor size and length
+
+
 2005-07-02(Sat) 02:56:31 +0900  Koichi Sasada  <ko1 atdot.net>
 
 	* compile.c : move specialized instruction point (new_insn_send)

Modified: trunk/benchmark/run.rb
===================================================================
--- trunk/benchmark/run.rb	2005-07-01 18:00:17 UTC (rev 192)
+++ trunk/benchmark/run.rb	2005-07-01 18:07:24 UTC (rev 193)
@@ -127,7 +127,7 @@
     print res.shift, "\t"
     (res||[]).each{|result|
       /([\d\.]+)/ =~ result
-      print $1 + "\t"
+      print $1 + "\t" if $1
     }
     puts
   }

Modified: trunk/rb/asm_parse.rb
===================================================================
--- trunk/rb/asm_parse.rb	2005-07-01 18:00:17 UTC (rev 192)
+++ trunk/rb/asm_parse.rb	2005-07-01 18:07:24 UTC (rev 193)
@@ -6,24 +6,27 @@
     puts '--------------------------------------------------------------'
     puts line
     size = 0
+    len  = 0
     
     while line = ARGF.gets
       if /\[start\] (\w+)/ =~ line
-        puts "\t; # size: #{size}"
+        puts "\t; # length: #{len}, size: #{size}"
         puts "\t; # !!"
-        stat[name] = size
+        stat[name] = [len, size]
         #
         name = $1
         puts '--------------------------------------------------------------'
         puts line
         size = 0
+        len  = 0
         next
       end
 
       unless /(\ALM)|(\ALB)|(\A\.)|(\A\/)/ =~ line
         puts line
         if /\[length = (\d+)\]/ =~ line
-          size += $1.to_i
+          len  += $1.to_i
+          size += 1
         end
       end
       
@@ -33,15 +36,16 @@
         if name != ename
           puts "!! start with #{name}, but end with #{ename}"
         end
-        stat[ename] = size
-        puts "\t; # size: #{size}"
+        stat[ename] = [len, size]
+        puts "\t; # length: #{len}, size: #{size}"
         break
       end
     end
   end
 end
 
-stat.sort_by{|a, b| -b * 1000 - a[0]}.each{|a, b|
-  puts "#{a}\t#{b}"
+stat.sort_by{|a, b| -b[0] * 1000 - a[0]}.each{|a, b|
+  puts "#{a}\t#{b.join("\t")}"
 }
-puts "total: #{stat.inject(0){|r, e| r+e[1]}}"
+puts "total length :\t#{stat.inject(0){|r, e| r+e[1][0]}}"
+puts "total size   :\t#{stat.inject(0){|r, e| r+e[1][1]}}"

Modified: trunk/vm_evalbody.h
===================================================================
--- trunk/vm_evalbody.h	2005-07-01 18:00:17 UTC (rev 192)
+++ trunk/vm_evalbody.h	2005-07-01 18:07:24 UTC (rev 193)
@@ -24,27 +24,41 @@
 #if 0
   DECL_SC_REG(VALUE, a, "di");
   DECL_SC_REG(VALUE, b, "dx");
+#elif __GNUC__ && __x86_64
+  DECL_SC_REG(VALUE, a, "13");
+  DECL_SC_REG(VALUE, b, "14");
 #else
   register VALUE reg_a;
   register VALUE reg_b;
 #endif
 #endif
 
-#if 1 && __GNUC__ && __i386__
+#if 0
+
+#elif __GNUC__ && __i386__
   DECL_SC_REG(VALUE *, pc, "si");
   VALUE * volatile reg_pc_store;
+#undef  SET_PC
+#undef  RESTORE_REGS
+#define SET_PC(x) (reg_pc_store = REG_PC = (x))
+#define RESTORE_REGS() { \
+  REG_PC = reg_pc_store; \
+}
 
+#elif __GNUC__ && __x86_64
+  DECL_SC_REG(VALUE *, pc, "15");
+  VALUE * volatile reg_pc_store;
 #undef  SET_PC
 #undef  RESTORE_REGS
-
 #define SET_PC(x) (reg_pc_store = REG_PC = (x))
 #define RESTORE_REGS() { \
   REG_PC = reg_pc_store; \
 }
+
 #elif 0 /* for debug */
   DECL_SC_REG(VALUE *, pc, "si");
 #else
-  VALUE *reg_pc;
+  register VALUE *reg_pc;
 #endif
 
   VALUE *reg_sp;


--
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]