From: "H. Peter Anvin" Subject: Re: [PATCH 1/1] x86: fix text_poke Date: Fri, 25 Apr 2008 13:41:00 -0700 Message-ID: <481241DC.3070601@zytor.com> References: <20080425152650.GA894@elte.hu> <20080425154854.GC3265@one.firstfloor.org> <20080425161916.GD3265@one.firstfloor.org> <20080425163035.GE9503@Krystal> <481209F2.4050908@zytor.com> <20080425170929.GA16180@Krystal> <20080425183748.GB16180@Krystal> <48123C9B.9020306@zytor.com> <20080425203717.GB25950@Krystal> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Andi Kleen , Linus Torvalds , Ingo Molnar , Jiri Slaby , David Miller , zdenek.kabelac@gmail.com, rjw@sisk.pl, paulmck@linux.vnet.ibm.com, akpm@linux-foundation.org, linux-ext4@vger.kernel.org, herbert@gondor.apana.org.au, penberg@cs.helsinki.fi, clameter@sgi.com, linux-kernel@vger.kernel.org, pageexec@freemail.hu, Jeremy Fitzhardinge To: Mathieu Desnoyers Return-path: Received: from terminus.zytor.com ([198.137.202.10]:38560 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932209AbYDYUpi (ORCPT ); Fri, 25 Apr 2008 16:45:38 -0400 In-Reply-To: <20080425203717.GB25950@Krystal> Sender: linux-ext4-owner@vger.kernel.org List-ID: Mathieu Desnoyers wrote: >>> + >> As far as this is concerned, all you accomplish here is that gcc, if it >> wants to re-use the %al value, will copy it into another register before >> doing your imv_conv_end(). >> > > Exactly, and by doing so, it will have to add instructions (mov, push..) > in the instruction pattern I am looking for and therefore I will detect > this and fall back on standard immediate values. > So what you're saying is you'll follow all the branches of code until you detect an immediate value (and eflags) kill. Yes, that should work. It's still ugly, and I have to say I find the complexity rather distasteful. I am willing to be convinced it's worth it, but I would really like to see hard numbers. Personally, I wouldn't be all that surprised if you lost more in constraining gcc scheduling than you gain. -hpa