From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Patch 4/5] x86_emulator: add the assembler code for three operands Date: Wed, 26 Nov 2008 14:50:22 +0200 Message-ID: <492D460E.10900@redhat.com> References: <20081103160036.499cb482@frecb000711> <20081103160504.3fa8c378@frecb000711> <4910222A.20201@redhat.com> <20081125085918.45bb29d2@frecb000711> <492C12B4.4050700@redhat.com> <20081126125908.1eb177d1@frecb000711> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm To: Guillaume Thouvenin Return-path: Received: from mx2.redhat.com ([66.187.237.31]:48080 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506AbYKZMvA (ORCPT ); Wed, 26 Nov 2008 07:51:00 -0500 In-Reply-To: <20081126125908.1eb177d1@frecb000711> Sender: kvm-owner@vger.kernel.org List-ID: Guillaume Thouvenin wrote: > It's the only code with shld instruction. I don't see how you can have > three different shld instructions here. I'm sure that I'm missing > something here because for me, when we emulate the shld instruction, the > code produced is the same. I mean that src.val and dst.val are always > unsigned long and I don't see why register size are important here. In > fact I don't understand why we need to use the switch ((_dst).bytes) > for the other emulations. > The flags vary according to operand size. For example, shld $1, %bx, %ax where %ax == 0x8000 will set eflags.cf, but shld $1, %ebx, %eax , with the same arguments, will not. -- error compiling committee.c: too many arguments to function