This is the mail archive of the gcc-help@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: __asm__ usage??



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.


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