This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: __asm__ usage??
- To: Raghava Raju <vraghava_raju at yahoo dot com>
- Subject: Re: __asm__ usage??
- From: "Ryan T. Sammartino" <ryants at home dot com>
- Date: Fri, 10 Aug 2001 15:23:49 -0700
- Cc: gcc-help at gcc dot gnu dot org
- References: <20010810214427.33952.qmail@web20008.mail.yahoo.com>
I think I can help with some of the non-PowerPC specific questions
* Raghava Raju <vraghava_raju@yahoo.com> [10/08/2001 14:51]:
>
> __asm__ __volatile__(SMP_WMB "\
> 1: lwarx %0,0,%3
> andc %0,%0,%2
> stwcx %0,0,%3
> bne 1b"
> SMP_MB
> : "=&r" (old), "=m" (*p)
> : "r" (mask), "r" (p), "m" (*p)
> : "cc");
>
> 1) what does these things denote: __volatile__,
> SMP_WMB, SMP_MB, "r","=&r","=m",
> "cc" and 1: .
Most of these are answered here:
http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_5.html#SEC102
> 2) Is it that %0,%2,%3 denote addresses of old,mask,p
> respectively.
>
I think so.
--
Ryan T. Sammartino
http://members.home.net/ryants/
Alexander Graham Bell is alive and well in New York, and still waiting
for a dial tone.