public OPCODE_DESCRIPTOR( UInt64 _groups, MULTI_MNEMONIC _mnemonic, UInt16 _id, INTERNAL_OPERAND[] _ops, int _props, byte _tested_flags, byte _modified_flags, byte _set_flags, byte _cleared_flags, byte _undefined_flags, byte _arch) { groups = _groups; mnemonic = _mnemonic; id = _id; ops = _ops; props = (UInt16)_props; tested_flags = _tested_flags; modified_flags = _modified_flags; set_flags = _set_flags; cleared_flags = _cleared_flags; undefined_flags = _undefined_flags; arch = _arch; }
//Get instruction's size. Well, really this is size of implicit operand // that influences on instruction's mnemonic. static void get_instruction_opsize(MULTI_MNEMONIC multi_mnemonic, INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode) { OPERAND_SIZE opsize = new OPERAND_SIZE(); if (multi_mnemonic.size >= sq_handlers.Count()) { idata.severe_err = ERRS.ERR_INTERNAL; } else { sq_handlers[multi_mnemonic.size](ref opsize, ref instr, idata, mode); } instr.opsize = (byte)opsize.size; //Possible sizes are 2/4/8. }