ruby-changes:68587
From: Alan <ko1@a...>
Date: Thu, 21 Oct 2021 08:09:58 +0900 (JST)
Subject: [ruby-changes:68587] 7662653b4c (master): Fix compilation for OPT_THREADED_CODE=2
https://git.ruby-lang.org/ruby.git/commit/?id=7662653b4c From 7662653b4c122f638b323d667be93ba516cd535d Mon Sep 17 00:00:00 2001 From: Alan Wu <XrXr@u...> Date: Mon, 5 Oct 2020 16:08:02 -0400 Subject: Fix compilation for OPT_THREADED_CODE=2 --- tool/ruby_vm/views/vm.inc.erb | 9 ++++++--- vm_opts.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tool/ruby_vm/views/vm.inc.erb b/tool/ruby_vm/views/vm.inc.erb index 3c7b602859..91e0b930c0 100644 --- a/tool/ruby_vm/views/vm.inc.erb +++ b/tool/ruby_vm/views/vm.inc.erb @@ -25,16 +25,19 @@ https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/vm.inc.erb#L25 <%= render 'insn_entry', locals: { insn: insn } -%> % end % -% RubyVM::TraceInstructions.to_a.each do |insn| -<%= render 'trace_instruction', locals: { insn: insn } -%> -% end % RubyVM::MicroJIT::ExampleInstructions.to_a.each do |insn| INSN_ENTRY(<%= insn.name %>) { START_OF_ORIGINAL_INSN(<%= insn.name %>); +#if USE_MACHINE_REGS // assumes USE_MACHINE_REGS, aka reg_pc setup, // aka #define SET_PC(x) (reg_cfp->pc = reg_pc = (x)) reg_pc = rb_ujit_empty_func(GET_CFP()); +#endif END_INSN(<%= insn.name %>); } % end +% +% RubyVM::TraceInstructions.to_a.each do |insn| +<%= render 'trace_instruction', locals: { insn: insn } -%> +% end diff --git a/vm_opts.h b/vm_opts.h index b0ca81f304..a10b26039c 100644 --- a/vm_opts.h +++ b/vm_opts.h @@ -34,7 +34,7 @@ https://github.com/ruby/ruby/blob/trunk/vm_opts.h#L34 * 2: call (function call for each insn dispatch) */ #ifndef OPT_THREADED_CODE -#define OPT_THREADED_CODE 0 +#define OPT_THREADED_CODE 2 #endif #define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0) -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/