Open grishasobol opened 6 years ago
I offer following design. The switch case should be generated by tablegen backend inside LLR Also I think is good idea to create LLRInstBuilder
class LLRDecoder { MCDisassembler disasm; DecodeStatus decode(LLRInst llr_inst, ArrayRef data, ...) { MCInst mc_inst; DecodeStatus status disasm.getInstruction(mc_inst, data, ....); if (OK) { llr_inst.setMCInst(mc_inst); switch(mc_inst.getID()) case ADD: { llr_inst.setExecutionFunction(execute_add) break; } } } }
I offer following design. The switch case should be generated by tablegen backend inside LLR Also I think is good idea to create LLRInstBuilder