[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071113192445.GA1463@Krystal>
Date: Tue, 13 Nov 2007 14:24:45 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
Andi Kleen <ak@....de>, Chuck Ebbert <cebbert@...hat.com>,
Christoph Hellwig <hch@...radead.org>,
Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [patch 5/8] Immediate Values - x86 Optimization
* H. Peter Anvin (hpa@...or.com) wrote:
> 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".
>
Hi Peter,
Yup, =g wasn't what I was looking for at all, the header comment is
bogus.
From
http://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html#Simple-Constraints
`r'
A register operand is allowed provided that it is in a general register.
From
http://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html#Machine-Constraints
Intel 386 config/i386/constraints.md
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" ?
> -hpa
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists