From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: [PATCH 0/8] Convert MUL/DIV to fastop Date: Sat, 9 Feb 2013 11:31:43 +0200 Message-ID: <1360402311-19904-1-git-send-email-avi.kivity@gmail.com> Cc: kvm@vger.kernel.org To: Gleb Natapov , Marcelo Tosatti Return-path: Received: from mail-we0-f181.google.com ([74.125.82.181]:46612 "EHLO mail-we0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752040Ab3BIJb5 (ORCPT ); Sat, 9 Feb 2013 04:31:57 -0500 Received: by mail-we0-f181.google.com with SMTP id t44so3632085wey.26 for ; Sat, 09 Feb 2013 01:31:55 -0800 (PST) Sender: kvm-owner@vger.kernel.org List-ID: This patchset converts MUL/DIV to fastop. We depart from the plan, which was to encode rdx:rax as a single operand, and instead encode it as two separate operands. This reduces register pressure on i386, and is simpler besides. As a bonus, XADD is converted as well. The series results in a nice code size reduction: 60147 0 0 60147 eaf3 arch/x86/kvm/emulate.o.before 56899 0 0 56899 de43 arch/x86/kvm/emulate.o.after Avi Kivity (8): KVM: x86 emulator: add support for writing back the source operand KVM: x86 emulator: decode extended accumulator explicity KVM: x86 emulator: switch MUL/DIV to DstXacc KVM: x86 emulator: Switch fastop src operand to RDX KVM: x86 emulator: convert single-operand MUL/IMUL to fastop KVM: x86 emulator: convert DIV/IDIV to fastop KVM: x86 emulator: drop unused old-style inline emulation KVM: x86 emulator: convert XADD to fastop arch/x86/kvm/emulate.c | 388 ++++++++++++++----------------------------------- 1 file changed, 106 insertions(+), 282 deletions(-) -- 1.8.1.2