summaryrefslogtreecommitdiff
path: root/vm_exec.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-10 09:22:37 (GMT)
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-10 09:22:37 (GMT)
commite85e95c409dbda989c8a815dcf7adcac1306b3f5 (patch)
tree316a0186b5a321f65b6047a3c0fcd701ce295192 /vm_exec.c
parentaee9f2879d02899a83bcba80010516e9c6d8fda7 (diff)
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_exec.c')
-rw-r--r--vm_exec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm_exec.c b/vm_exec.c
index a8b14e3..26b0be8 100644
--- a/vm_exec.c
+++ b/vm_exec.c
@@ -63,7 +63,11 @@ vm_exec_core(rb_thread_t *th, VALUE initial)
#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