From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760855AbXKMTjz (ORCPT ); Tue, 13 Nov 2007 14:39:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755528AbXKMTjs (ORCPT ); Tue, 13 Nov 2007 14:39:48 -0500 Received: from terminus.zytor.com ([198.137.202.10]:52056 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754784AbXKMTjr (ORCPT ); Tue, 13 Nov 2007 14:39:47 -0500 Message-ID: <4739FCA0.4040702@zytor.com> Date: Tue, 13 Nov 2007 11:36:00 -0800 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.5 (X11/20070727) MIME-Version: 1.0 To: Mathieu Desnoyers CC: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Andi Kleen , Chuck Ebbert , Christoph Hellwig , Jeremy Fitzhardinge Subject: Re: [patch 5/8] Immediate Values - x86 Optimization References: <20071113185800.436425570@polymtl.ca> <20071113190040.740103668@polymtl.ca> <4739F609.50501@zytor.com> <20071113192445.GA1463@Krystal> In-Reply-To: <20071113192445.GA1463@Krystal> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Mathieu Desnoyers wrote: >> - Use "=g" constraint for char immediate value inline assembly. >> >> "=g" is the same as "=rmi" which is inherently bogus. In your actual code >> you use "=r", the correct constraint is "=q". > > q > Any register accessible as rl. In 32-bit mode, a, b, c, and d; in 64-bit mode, any integer register. > > > I am worried that "=q" might exclude the si and di registers in 32-bit mode. > > What exactly is wrong with "=r" ? > For "char" (8-bit) values, sp/bp/si/di are illegal in 32-bit mode. Hence "=q". -hpa