From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/2] x86: eliminate TS_XSAVE Date: Wed, 05 May 2010 10:30:18 +0300 Message-ID: <4BE11E8A.2090804@redhat.com> References: <1272812038-32484-1-git-send-email-avi@redhat.com> <1272812038-32484-2-git-send-email-avi@redhat.com> <4BDDBA18.3080909@redhat.com> <4BDF4407.8000503@zytor.com> <4BDFCF9F.3030600@redhat.com> <1272996927.2833.13.camel@sbs-t61.sc.intel.com> <4BE06642.6080702@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Suresh Siddha , Brian Gerst , "Cui, Dexuan" , Sheng Yang , Ingo Molnar , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" To: "H. Peter Anvin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39959 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752519Ab0EEHaf (ORCPT ); Wed, 5 May 2010 03:30:35 -0400 In-Reply-To: <4BE06642.6080702@zytor.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/04/2010 09:24 PM, H. Peter Anvin wrote: > > I would like to request one change, however. I would like to see the > alternatives code to be: > > movb $0,reg > movb $1,reg > > ... instead of using xor (which has to be padded with NOPs, which is of > course pointless since the slot is a fixed size.) Right. > I would suggest using > a byte-sized variable instead of a dword-size variable to save a few > bytes, too. > I used a bool, and the code already compiles to a byte mov. Though it could be argued that a word instruction is better since it avoids a false dependency, and allows a preceding instruction that modifies %reg to be executed after the mov instruction. > Once the jump label framework is integrated and has matured, I think we > should consider using it to save the mov/test/jump. > IIRC that has an implied unlikely() which isn't suitable here? Perhaps the immediate values patches. -- error compiling committee.c: too many arguments to function