summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/views/lib/ruby_vm/rjit/instruction.rb.erb
blob: 4f08524a77b669e8277d2e51afc9e2954301ea36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module RubyVM::RJIT # :nodoc: all
  Instruction = Data.define(:name, :bin, :len, :operands)

  INSNS = {
% RubyVM::Instructions.each_with_index do |insn, i|
    <%= i %> => Instruction.new(
      name: :<%= insn.name %>,
      bin: <%= i %>, # BIN(<%= insn.name %>)
      len: <%= insn.width %>, # insn_len
      operands: <%= (insn.operands unless insn.name.start_with?('trace_')).inspect %>,
    ),
% end
  }
end