This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: label value in ppc asm stmt
- From: Geoff Keating <geoffk at geoffk dot org>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 20 Jan 2003 10:00:10 -0800
- Subject: Re: label value in ppc asm stmt
- References: <jrydberg@night.trouble.net><200301201542.KAA27532@makai.watson.ibm.com>
David Edelsohn <dje@watson.ibm.com> writes:
> > I want to get the address of a label within a asm-stmt.
>
> Constraint "s" probably is good enough.
>
> {
> __asm__ ("beq- cr0,%l0" :: "s" (&&label));
>
> label:
> }
... although note that this code doesn't actually work, because you
can't change control flow inside an asm statement.
--
- Geoffrey Keating <geoffk@geoffk.org>