On 2/14/2012 10:13 PM, Paul H. Hargrove wrote:
On the linux/mips64el platform I also tried the PathScale 3.3a compilers on both branches. On both branches the atomic_*_noinline tests all PASS, which validates these patches.
On trunk all the tests in test/asm are PASSing.
However, the versions NOT suffixed with _noinline are FAILing on the 1.5 branch. Since those failures DO NOT use the files touched by these patches, they are irrelevant.

Oops - I was looking at the wrong output when I stated pathcc/trunk was PASSing all tests.
The *inline* atomics tests SIGBUS w/ the pathcc compilers on BOTH branches.

I know from previous encounters with pathcc on MIPS that the problem is due to the explict use of "$1" (aka "AT", the "Assembler Temporary" register). Unlike gcc, pathcc schedules this as a normal register. Indeed the attached patch (which should apply cleanly to both branches) resolves the problem simply by conditionally adding "at" to the clobbers for the inline asm.

This is independent of the patches in my previous posting.

-Paul

--
Paul H. Hargrove                          phhargr...@lbl.gov
Future Technologies Group
HPC Research Department                   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900

--- openmpi-1.7a1r25913/opal/include/opal/sys/mips/atomic.h     2012-02-13 
20:00:06.000000000 -0600
+++ openmpi-1.7a1r25913m/opal/include/opal/sys/mips/atomic.h    2012-02-15 
00:23:44.648085811 -0600
@@ -119,7 +119,11 @@
                          ".set reorder          \n"
                          : "=&r"(ret), "=m"(*addr)
                          : "m"(*addr), "r"(oldval), "r"(newval)
-                         : "cc", "memory");
+                         : "cc", "memory"
+#ifdef __PATHCC__
+                           , "at"
+#endif
+                        );
    return (ret == oldval);
 }

@@ -168,7 +172,11 @@
                          ".set reorder          \n"
                          : "=&r" (ret), "=m" (*addr)
                          : "m" (*addr), "r" (oldval), "r" (newval)
-                         : "cc", "memory");
+                         : "cc", "memory"
+#ifdef __PATHCC__
+                           , "at"
+#endif
+                        );

    return (ret == oldval);
 }

Reply via email to