def get_insns(cls = None):
insns = []<EOL>if cls is None:<EOL><INDENT>cls = Instruction<EOL><DEDENT>if "<STR_LIT>" in cls.__dict__.keys():<EOL><INDENT>insns = [cls]<EOL><DEDENT>for subcls in cls.__subclasses__():<EOL><INDENT>insns += get_insns(subcls)<EOL><DEDENT>return insns<EOL>
Get all Instructions. This is based on all known subclasses of `cls`. If non is given, all Instructions are returned.
Only such instructions are returned that can be generated, i.e., that have a mnemonic, opcode, etc. So other
classes in the hierarchy are not matched.

:param cls: Base class to get list
:type cls: Instruction
:return: List of instructions