a cpu instruction 'formal' description
formal description of arguments (array of cpu-specific symbols)
binary encoding of the opcode (integer for risc, array of bytes for cisc)
binary mask for decoding
list of bit fields in the binary encoding hash position => field position is bit shift for risc, [byte index, bit shift] for risc field is cpu-specific
the name of the instruction
hash of opcode generic properties/restrictions (mostly property => true/false)
# File metasm/main.rb, line 123 def initialize(name, bin=nil) @name = name @bin = bin @args = [] @fields = {} @props = {} end
# File metasm/main.rb, line 131 def basename @name.sub(/\..*/, '') end
# File metasm/main.rb, line 135 def dup o = Opcode.new(@name.dup, @bin) o.bin = @bin.dup if @bin.kind_of?(::Array) o.args = @args.dup o.fields = @fields.dup o.props = @props.dup o end