1
1

This is an old patch (r26226) from two years ago that somehow went directly into the 1.6 branch without first entering the trunk. Hence, the problem it fixed still remains in the trunk, and in the 1.7 series as a regression :-(

Thanks to Paul Hargrove for tracking it down.

RM-approved

cmr=v1.7.4:reviewer=ompi-gk1.7

This commit was SVN r30397.

The following SVN revision numbers were found above:
  r26226 --> open-mpi/ompi@12781482b9
Этот коммит содержится в:
Ralph Castain 2014-01-23 15:47:49 +00:00
родитель 9f3bf4747d
Коммит a19510187b

Просмотреть файл

@ -118,6 +118,14 @@ void opal_atomic_wmb(void)
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
#ifdef __xlC__
/* work-around bizzare xlc bug in which it sign-extends
a pointer to a 32-bit signed integer */
#define OPAL_ASM_ADDR(a) ((uintptr_t)a)
#else
#define OPAL_ASM_ADDR(a) (a)
#endif
static inline int opal_atomic_cmpset_32(volatile int32_t *addr,
int32_t oldval, int32_t newval)
{
@ -131,7 +139,7 @@ static inline int opal_atomic_cmpset_32(volatile int32_t *addr,
" bne- 1b \n\t"
"2:"
: "=&r" (ret), "=m" (*addr)
: "r" (addr), "r" (oldval), "r" (newval), "m" (*addr)
: "r" OPAL_ASM_ADDR(addr), "r" (oldval), "r" (newval), "m" (*addr)
: "cc", "memory");
return (ret == oldval);
@ -250,7 +258,7 @@ static inline int opal_atomic_cmpset_64(volatile int64_t *addr,
"subfic r9,r5,0 \n\t"
"adde %0,r9,r5 \n\t"
: "=&r" (ret)
: "r"(addr),
: "r"OPAL_ASM_ADDR(addr),
"m"(oldval), "m"(newval)
: "r4", "r5", "r9", "cc", "memory");
@ -298,7 +306,7 @@ static inline int32_t opal_atomic_add_32(volatile int32_t* v, int inc)
" stwcx. %0, 0, %3 \n\t"
" bne- 1b \n\t"
: "=&r" (t), "=m" (*v)
: "r" (inc), "r" (v), "m" (*v)
: "r" (inc), "r" OPAL_ASM_ADDR(v), "m" (*v)
: "cc");
return t;
@ -315,7 +323,7 @@ static inline int32_t opal_atomic_sub_32(volatile int32_t* v, int dec)
" stwcx. %0,0,%3 \n\t"
" bne- 1b \n\t"
: "=&r" (t), "=m" (*v)
: "r" (dec), "r" (v), "m" (*v)
: "r" (dec), "r" OPAL_ASM_ADDR(v), "m" (*v)
: "cc");
return t;