Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

From: Julian Seward (julian_at_[hidden])
Date: 2006-03-12 07:24:32


r9191 (approximately Fri 3 March 06) does not build on ppc32-linux
due to use of register names of the form "r9" etc in
opal/include/opal/sys/powerpc/atomic.h, in opal_atomic_cmpset_64().
You must use either names of the form "%%r9" or just plain "9",
or give gcc the flag -mregnames (iirc). The plain-digit convention
is what the rest of the assembly fragments in that file use.
My inelegant fix is below.

This is with SuSE 10.0 running on a Mac Mini. (glibc 2.3.5, gcc 4.0.2)

Config args were --with-memory-manager=none --disable-mpi-f77

J

Index: opal/include/opal/sys/powerpc/atomic.h
===================================================================
--- opal/include/opal/sys/powerpc/atomic.h (revision 9191)
+++ opal/include/opal/sys/powerpc/atomic.h (working copy)
@@ -259,17 +259,17 @@
      * is very similar to the pure 64 bit version.
      */
    __asm__ __volatile__ (
- "ld r4,%2 \n\t"
- "ld r5,%3 \n\t"
- "1: ldarx r9, 0, %1 \n\t"
- " cmpd 0, r9, r4 \n\t"
+ "ld %%r4,%2 \n\t"
+ "ld %%r5,%3 \n\t"
+ "1: ldarx %%r9, 0, %1 \n\t"
+ " cmpd 0, %%r9, %%r4 \n\t"
                          " bne- 2f \n\t"
- " stdcx. r5, 0, %1 \n\t"
+ " stdcx. %%r5, 0, %1 \n\t"
                          " bne- 1b \n\t"
                          "2: \n\t"
- "xor r5,r4,r9 \n\t"
- "subfic r9,r5,0 \n\t"
- "adde %0,r9,r5 \n\t"
+ "xor %%r5,%%r4,%%r9 \n\t"
+ "subfic %%r9,%%r5,0 \n\t"
+ "adde %0,%%r9,%%r5 \n\t"
                          : "=&r" (ret)
                          : "r"(addr),
                            "m"(oldval), "m"(newval)