# HG changeset patch # User David Vrabel # Date 1325778436 0 # Node ID 03781de56c31072266fb464e7dfeec133bcf0fb4 # Parent 94180a5a0c7c7d680ede2e54bd13f56ed43f452d x86: emulate lea with two register operands correctly An lea instruction with two register operands should raise an undefined instruction exception. Skype does such a instruction and will crash when starting if it does not get the exception. Signed-off-by: David Vrabel Signed-off-by: Keir Fraser Committed-by: Keir Fraser --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -2100,6 +2100,7 @@ x86_emulate( } case 0x8d: /* lea */ + generate_exception_if(ea.type != OP_MEM, EXC_UD, -1); dst.val = ea.mem.off; break;