summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/views/_mjit_compile_send.erb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-03-25 06:58:50 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-03-25 06:58:50 +0000
commit8dd0fb9039bbe6152ea5542e6bc70de152871e23 (patch)
tree3a8c658692e6692095195b081687cf92055a74e9 /tool/ruby_vm/views/_mjit_compile_send.erb
parent9f05891c3daa79e26dd01f0575f1b595ddb7d302 (diff)
use cfp->bp more.
cfp->bp was (re-)introduced by Kokubun san, but VM doesn't use it because I (ko1) want to remove it in a future. But using it make leave instruction fast because of sp consisntency check. So now VM uses cfp->bp. To use cfp->bp, I checked the value and I found that it is not a "initial value of sp" but a "initial value of ep". Fix this problem and fix all bp references (this is why bp is renamed to bp_). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm/views/_mjit_compile_send.erb')
-rw-r--r--tool/ruby_vm/views/_mjit_compile_send.erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_send.erb b/tool/ruby_vm/views/_mjit_compile_send.erb
index 0c59e040ce..e699c96af8 100644
--- a/tool/ruby_vm/views/_mjit_compile_send.erb
+++ b/tool/ruby_vm/views/_mjit_compile_send.erb
@@ -37,7 +37,7 @@
fprintf(f, " if (UNLIKELY(GET_GLOBAL_METHOD_STATE() != %"PRI_SERIALT_PREFIX"u ||\n", cc_copy->method_state);
fprintf(f, " RCLASS_SERIAL(CLASS_OF(stack[%d])) != %"PRI_SERIALT_PREFIX"u)) {\n", b->stack_size - 1 - argc, cc_copy->class_serial);
fprintf(f, " reg_cfp->pc = original_body_iseq + %d;\n", pos);
- fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + 1);
+ fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp_ + %d;\n", b->stack_size);
fprintf(f, " goto cancel;\n");
fprintf(f, " }\n");
@@ -77,7 +77,7 @@
% # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow.
fprintf(f, " if (UNLIKELY(ruby_vm_event_enabled_global_flags & ISEQ_TRACE_EVENTS)) {\n");
- fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + (int)<%= insn.call_attribute('sp_inc') %> + 1);
+ fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp_ + %d;\n", b->stack_size + (int)<%= insn.call_attribute('sp_inc') %>);
if (!pc_moved_p) {
fprintf(f, " reg_cfp->pc = original_body_iseq + %d;\n", next_pos);
}