Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24933/src
Modified Files: Tag: devel_0_38 m_atomic.h Log Message: fixes for atomic function on PPC
Index: m_atomic.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/m_atomic.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** m_atomic.h 2 Jan 2005 19:56:02 -0000 1.1.2.1 --- m_atomic.h 28 Jun 2005 07:44:32 -0000 1.1.2.2 *************** *** 29,33 ****
/* ppc */ ! #define ATOMIC_INC(X) \ int X##_i; \ asm __volatile__( \ --- 29,33 ----
/* ppc */ ! #define ATOMIC_INC(X) { \ int X##_i; \ asm __volatile__( \ *************** *** 35,46 **** "lwarx %0, 0, %2 \n" \ "addic %0, %0, 1 \n" \ ! "stwcx %0, 0, %2 \n" \ "bne- 1b \n" \ :"=&r"(X##_i), "=m"(X) \ : "r" (&X), "m"(X) \ ! : "cc");
! #define ATOMIC_DEC(X) \ int X##_i; \ asm __volatile__( \ --- 35,46 ---- "lwarx %0, 0, %2 \n" \ "addic %0, %0, 1 \n" \ ! "stwcx. %0, 0, %2 \n" \ "bne- 1b \n" \ :"=&r"(X##_i), "=m"(X) \ : "r" (&X), "m"(X) \ ! : "cc"); }
! #define ATOMIC_DEC(X) { \ int X##_i; \ asm __volatile__( \ *************** *** 48,55 **** "lwarx %0, 0, %2 \n" \ "addic %0, %0, -1 \n" \ ! "stwcx %0, 0, %2 \n" \ "bne- 1b \n" \ ! :"=&r"(i), "=m"(X) \ ! : "r" (X##_&X), "m"(X) \ ! : "cc"); #endif --- 48,55 ---- "lwarx %0, 0, %2 \n" \ "addic %0, %0, -1 \n" \ ! "stwcx. %0, 0, %2 \n" \ "bne- 1b \n" \ ! :"=&r"(X##_i), "=m"(X) \ ! : "r" (&X), "m"(X) \ ! : "cc"); } #endif