All of lore.kernel.org
 help / color / mirror / Atom feed
* __asm__  C code in mips-Linux
@ 2003-04-03  1:02 Mike K.
  2003-04-03  2:09 ` Ralf Baechle
  2003-04-03 12:58   ` Kevin D. Kissell
  0 siblings, 2 replies; 4+ messages in thread
From: Mike K. @ 2003-04-03  1:02 UTC (permalink / raw)
  To: linux-mips

extern __inline__ void atomic_add(int i, atomic_t * v)
{
	unsigned long temp;

	__asm__ __volatile__(
		"1:   ll      %0, %1      # atomic_add\n"
		"     addu    %0, %2                  \n"
		"     sc      %0, %1                  \n"
		"     beqz    %0, 1b                  \n"
		: "=&r" (temp), "=m" (v->counter)
		: "Ir" (i), "m" (v->counter));
}


Beginner questions on the above code:
1. what is %0 %1 %2?
2. what is the details meaning of the last two line of the above code?
3. Very thanksful if you can comment each line with detail description  for 
me, thanks a lot!


_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-04-03 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-03  1:02 __asm__ C code in mips-Linux Mike K.
2003-04-03  2:09 ` Ralf Baechle
2003-04-03 12:58 ` Kevin D. Kissell
2003-04-03 12:58   ` Kevin D. Kissell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.