This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC proposal for "@" asm constraint


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]