On 03/10/2011 09:35 AM, Takuya Yoshikawa wrote:
x86_emulate_insn() is too long and has many confusing goto statements. This patch is the first part of a work which tries to split it into a few meaningful functions: just encapsulates the switch statement for the one byte instruction emulation as emulate_onebyte_insn().
I, too, dislike the switch statements. So I started on a path to eliminate it completely - take a look at struct opcode::execute. If present, it is executed instead of the code in the switch statements.
The plan is to migrate all of the contents of the switch statements into ->execute() callbacks. This way, all of the information about an instruction is present in the decode tables.
-- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html