[前][次][番号順一覧][スレッド一覧]

ruby-changes:32475

From: yugui <ko1@a...>
Date: Fri, 10 Jan 2014 18:22:45 +0900 (JST)
Subject: [ruby-changes:32475] yugui:r44554 (trunk): * vm_exec.c (cfp): Avoid generating invalid binary for

yugui	2014-01-10 18:22:37 +0900 (Fri, 10 Jan 2014)

  New Revision: 44554

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44554

  Log:
    * vm_exec.c (cfp): Avoid generating invalid binary for
      NativeClient.
      r15 on x86_64 is reserved by NativeClient.  So r15 to cfp used to
      generate invalid binary under some combinations of compiler
      optimization flags.

  Modified files:
    trunk/ChangeLog
    trunk/vm_exec.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44553)
+++ ChangeLog	(revision 44554)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jan 10 16:27:20 2014  Yuki Yugui Sonoda  <yugui@g...>
+
+	* vm_exec.c (cfp): Avoid generating invalid binary for
+	  NativeClient.
+	  r15 on x86_64 is reserved by NativeClient.  So r15 to cfp used to
+	  generate invalid binary under some combinations of compiler
+	  optimization flags.
+
 Fri Jan 10 18:01:41 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm_insnhelper.c (vm_search_super_method): allow bound method from a
Index: vm_exec.c
===================================================================
--- vm_exec.c	(revision 44553)
+++ vm_exec.c	(revision 44554)
@@ -63,7 +63,11 @@ vm_exec_core(rb_thread_t *th, VALUE init https://github.com/ruby/ruby/blob/trunk/vm_exec.c#L63
 
 #elif defined(__GNUC__) && defined(__x86_64__)
     DECL_SC_REG(VALUE *, pc, "14");
+# if defined(__native_client__)
+    DECL_SC_REG(rb_control_frame_t *, cfp, "11");
+# else
     DECL_SC_REG(rb_control_frame_t *, cfp, "15");
+# endif
 #define USE_MACHINE_REGS 1
 
 #else

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]