ruby/tool/ruby_vm/views/vm.inc.erb
2021-10-20 18:19:28 -04:00

44 lines
1.3 KiB
Text

/* -*- C -*- */
%# Copyright (c) 2017 Urabe, Shyouhei. All rights reserved.
%#
%# This file is a part of the programming language Ruby. Permission is hereby
%# granted, to either redistribute and/or modify this file, provided that the
%# conditions mentioned in the file COPYING are met. Consult the file for
%# details.
<%= render 'copyright' %>
<%= render 'notice', locals: {
this_file: 'is VM main loop',
edit: __FILE__,
} -%>
#include "vm_insnhelper.h"
% RubyVM::BareInstructions.to_a.each do |insn|
<%= render 'insn_entry', locals: { insn: insn } -%>
% end
%
% RubyVM::OperandsUnifications.to_a.each do |insn|
<%= render 'insn_entry', locals: { insn: insn } -%>
% end
%
% RubyVM::InstructionsUnifications.to_a.each do |insn|
<%= render 'insn_entry', locals: { insn: insn } -%>
% end
%
% RubyVM::MicroJIT::ExampleInstructions.to_a.each do |insn|
INSN_ENTRY(ujit_call_example_with_ec)
{
START_OF_ORIGINAL_INSN(ujit_call_example_with_ec);
#if USE_MACHINE_REGS
// assumes USE_MACHINE_REGS, aka reg_pc setup,
// aka #define SET_PC(x) (reg_cfp->pc = reg_pc = (x))
rb_ujit_empty_func_with_ec(GET_CFP(), ec);
RESTORE_REGS();
#endif
END_INSN(ujit_call_example_with_ec);
}
% end
%
% RubyVM::TraceInstructions.to_a.each do |insn|
<%= render 'trace_instruction', locals: { insn: insn } -%>
% end