From: Richard Henderson <rth@twiddle.net>
To: axp-list@redhat.com
Subject: Re: GCC inline ASM is 'evil'
Date: Wed, 13 Nov 2002 22:50:19 -0800 [thread overview]
Message-ID: <20021113225019.C19573@twiddle.net> (raw)
In-Reply-To: <ODEEIIAMNNHHFAMGOBAPMEAMCFAA.voodoo@alphadriven.org>; from voodoo@alphadriven.org on Tue, Nov 12, 2002 at 07:04:00PM -0500
On Tue, Nov 12, 2002 at 07:04:00PM -0500, Peter Petrakis wrote:
> // ret= ASM("ldl_l %v0,(%a0);", dest);
> asm ( "ldl_l %0,(%16)": "=r" (ret): "p"(dest) );
>
> temp= ASM("addl %a0,1,%v0;\
> stl_c %v0,(%a1) ;",ret,dest);
Incidentally, the original asm is broken as well, unless you're
going to get guarantees from somewhere that DU won't move a
memory access in between the ldl_l and stl_c. You have to do
this as a single block of asm text.
r~
prev parent reply other threads:[~2002-11-14 6:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-13 0:04 GCC inline ASM is 'evil' Peter Petrakis
2002-11-13 0:32 ` Falk Hueffner
2002-11-14 6:51 ` Richard Henderson
2002-11-14 6:50 ` Richard Henderson [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox