]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips: enable helgrind test tc08_hbl2 for mips64
authorPetar Jovanovic <mips32r2@gmail.com>
Thu, 4 Apr 2013 15:33:27 +0000 (15:33 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Thu, 4 Apr 2013 15:33:27 +0000 (15:33 +0000)
Enable the test for mips64.
Minor improvement in macro INC.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13360

helgrind/tests/tc08_hbl2.c

index b39f9ee711ac5fda4a68c6d792da77d1b66d3aa4..54a1f683d7f588bea183b2702e009b53f27e3e16 100644 (file)
@@ -31,6 +31,7 @@
 #undef PLAT_arm_linux
 #undef PLAT_s390x_linux
 #undef PLAT_mips32_linux
+#undef PLAT_mips64_linux
 
 #if defined(__APPLE__) && defined(__i386__)
 #  define PLAT_x86_darwin 1
 #elif defined(__linux__) && defined(__s390x__)
 #  define PLAT_s390x_linux 1
 #elif defined(__linux__) && defined(__mips__)
+#if (__mips==64)
+#  define PLAT_mips64_linux 1
+#else
 #  define PLAT_mips32_linux 1
 #endif
+#endif
 
 
 #if defined(PLAT_amd64_linux) || defined(PLAT_x86_linux) \
       "   jl    1b\n"                              \
       : "+m" (_lval) :: "cc", "0","1" \
    )
-#elif defined(PLAT_mips32_linux)
+#elif defined(PLAT_mips32_linux) || defined(PLAT_mips64_linux)
 #  define INC(_lval,_lqual)                         \
      __asm__ __volatile__ (                         \
       "L1xyzzy1" _lqual":\n"                        \
-      "        move $8, %0\n"                       \
-      "        ll $9, 0($t0)\n"                     \
-      "        addi $9, $9, 1\n"                    \
-      "        sc $9, 0($t0)\n"                     \
-      "        li $10, 1\n"                         \
-      "        bne $9, $10, L1xyzzy1" _lqual        \
+      "        move $t0, %0\n"                      \
+      "        ll   $t1, 0($t0)\n"                  \
+      "        addi $t1, $t1, 1\n"                  \
+      "        sc   $t1, 0($t0)\n"                  \
+      "        beqz $t1, L1xyzzy1" _lqual           \
       : /*out*/ : /*in*/ "r"(&(_lval))              \
-      : /*trash*/ "$8", "$9", "$10", "cc", "memory" \
+      : /*trash*/ "t0", "t1", "memory"              \
         )
 #else
 #  error "Fix Me for this platform"