summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/views/lib/ruby_vm/rjit/instruction.rb.erb
blob: 84c2e9241438d8f1022edd13677d0047a242b1e4 (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.opes unless insn.name.start_with?('trace_')).inspect %>,
    ),
% end
  }
end