summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/views/vm.inc.erb
blob: 49d6fc2e162b4931a6c774dbc72297b44a5f1685 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* -*- 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::TraceInstructions.to_a.each do |insn|
<%= render 'trace_instruction', locals: { insn: insn } -%>
% end
% RubyVM::UJITExampleInstructions.to_a.each do |insn|
INSN_ENTRY(<%= insn.name %>)
{
    START_OF_ORIGINAL_INSN(<%= insn.name %>);
    // 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(), reg_pc);
    END_INSN(<%= insn.name %>);
}
% end