node/lib/metasm/metasm/cpu/arm/decode.rb
def decode_findopcode(edata)
		return if edata.ptr+4 > edata.length
		di = DecodedInstruction.new(self)
		val = edata.decode_imm(:u32, @endianness)
		di.instance_variable_set('@raw', val)
		di if di.opcode = @bin_lookaside[(val >> 20) & 0xff].find { |op|
			(not op.props[:cond] or
			 ((val >> @fields_shift[:cond]) & @fields_mask[:cond]) != 0xf) and
			(op.bin & op.bin_mask) == (val & op.bin_mask)
		}
	end
# create the bin_mask for a given opcode
create the bin_mask for a given opcode
create the bin_mask for a given opcode
def decode_findopcode(edata)
		return if edata.ptr+4 > edata.length
		di = DecodedInstruction.new(self)
		val = edata.decode_imm(:u32, @endianness)
		di.instance_variable_set('@raw', val)
		di if di.opcode = @bin_lookaside[(val >> 20) & 0xff].find { |op|
			(not op.props[:cond] or
			 ((val >> @fields_shift[:cond]) & @fields_mask[:cond]) != 0xf) and
			(op.bin & op.bin_mask) == (val & op.bin_mask)
		}
	end
def decode_findopcode ( edata ) return if edata . ptr + 4 > edata . length di = DecodedInstruction . new ( self ) val = edata . decode_imm ( :u32 , @endianness ) di . instance_variable_set ( '@raw' , val ) di if di . opcode = @bin_lookaside [ ( val >> 20 ) & 0xff ] . find { | op | ( not op . props [ :cond ] or ( ( val >> @fields_shift [ :cond ] ) & @fields_mask [ :cond ] ) != 0xf ) and ( op . bin & op . bin_mask ) == ( val & op . bin_mask ) } end
create the bin_mask for a given opcode
create the bin_mask for a given opcode
edata