From 4854b14bc374adb317e50502334dda717b3dce09 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 11 Feb 2018 02:41:49 +0000 Subject: _mjit_compile_{insn,send}.erb: suppress warnings git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/ruby_vm/views/_mjit_compile_insn.erb | 6 +++--- tool/ruby_vm/views/_mjit_compile_send.erb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tool/ruby_vm/views/_mjit_compile_insn.erb b/tool/ruby_vm/views/_mjit_compile_insn.erb index 46c585ca52..0b3f1b56e4 100644 --- a/tool/ruby_vm/views/_mjit_compile_insn.erb +++ b/tool/ruby_vm/views/_mjit_compile_insn.erb @@ -51,10 +51,10 @@ % # JIT: move sp and pc if necessary % if insn.handles_frame? fprintf(f, " reg_cfp->pc = original_body_iseq + %d;\n", next_pos); /* ADD_PC(INSN_ATTR(width)); */ - fprintf(f, " reg_cfp->sp = reg_cfp->bp + %d;\n", b->stack_size + 1 - <%= insn.pops.size %>); /* POPN(INSN_ATTR(popn)); */ + fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + 1 - <%= insn.pops.size %>); /* POPN(INSN_ATTR(popn)); */ % else fprintf(f, " reg_cfp->pc = original_body_iseq + %d;\n", pos); - fprintf(f, " reg_cfp->sp = reg_cfp->bp + %d;\n", b->stack_size + 1); + fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + 1); % end % % # JIT: Print insn body in insns.def @@ -110,7 +110,7 @@ % # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow. % if trace_enablable_insns.include?(insn.name) fprintf(f, " if (UNLIKELY(ruby_vm_event_enabled_flags & ISEQ_TRACE_EVENTS)) {\n"); - fprintf(f, " reg_cfp->sp = 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') %> + 1); fprintf(f, " return Qundef; /* cancel JIT */\n"); fprintf(f, " }\n"); % end diff --git a/tool/ruby_vm/views/_mjit_compile_send.erb b/tool/ruby_vm/views/_mjit_compile_send.erb index cefb071b1e..2a000e802c 100644 --- a/tool/ruby_vm/views/_mjit_compile_send.erb +++ b/tool/ruby_vm/views/_mjit_compile_send.erb @@ -24,7 +24,7 @@ % # JIT: move sp and pc if necessary fprintf(f, " reg_cfp->pc = original_body_iseq + %d;\n", next_pos); /* ADD_PC(INSN_ATTR(width)); */ - fprintf(f, " reg_cfp->sp = reg_cfp->bp + %d;\n", b->stack_size + 1 - <%= insn.pops.size %>); /* POPN(INSN_ATTR(popn)); */ + fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + 1 - <%= insn.pops.size %>); /* POPN(INSN_ATTR(popn)); */ % # JIT: Invalidate call cache if it requires vm_search_method. This allows to inline some of following things. fprintf(f, " if (UNLIKELY(GET_GLOBAL_METHOD_STATE() != %"PRI_SERIALT_PREFIX"u ||\n", cc->method_state); @@ -63,7 +63,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_flags & ISEQ_TRACE_EVENTS)) {\n"); - fprintf(f, " reg_cfp->sp = 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') %> + 1); fprintf(f, " return Qundef; /* cancel JIT */\n"); fprintf(f, " }\n"); -- cgit v1.2.3