This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC proposal for "@" asm constraint
- To: Jamie Lokier <lk at tantalophile dot demon dot co dot uk>
- Subject: Re: GCC proposal for "@" asm constraint
- From: Andrea Arcangeli <andrea at suse dot de>
- Date: Tue, 19 Sep 2000 00:46:30 +0200
- Cc: gcc at gcc dot gnu dot org, kuznet at ms2 dot inr dot ac dot ru, linux-kernel at vger dot kernel dot org, torvalds at transmeta dot com
- References: <Pine.LNX.4.21.0009071837310.8494-100000@inspiron.random> <20000908134105.B24172@pcep-jamie.cern.ch>
On Fri, Sep 08, 2000 at 01:41:05PM +0200, Jamie Lokier wrote:
> Casting via __dummy is there so that the "m" (or "=m") memory constraint
> will make that operand refer to the actual object in memory, and not a
> copy (in a different area of memory).
Are you really sure gcc could pass a copy even when I specify "memory" in the
clobber list? My point is that "memory" could also mean that the address where
gcc is taking the _copy_ could be clobbered by the asm itself as side effect
and so gcc shouldn't allowed to assume anything and it should first copy the
result value of the previous actions to its real final location before starting
up any asm that clobbers "memory". I think the "memory" clobber should be
enough to ensure that the address used with the .*m constraints refers to the
real backend of the memory passed as parameter to the inline asm.
I think we can remove all the __dummy stuff and put the "memory" in such asm
statements.
Comments?
Andrea