|
From: <sv...@va...> - 2013-04-04 15:33:36
|
petarj 2013-04-04 16:33:27 +0100 (Thu, 04 Apr 2013)
New Revision: 13360
Log:
mips: enable helgrind test tc08_hbl2 for mips64
Enable the test for mips64.
Minor improvement in macro INC.
Modified files:
trunk/helgrind/tests/tc08_hbl2.c
Modified: trunk/helgrind/tests/tc08_hbl2.c (+12 -8)
===================================================================
--- trunk/helgrind/tests/tc08_hbl2.c 2013-04-04 11:55:09 +01:00 (rev 13359)
+++ trunk/helgrind/tests/tc08_hbl2.c 2013-04-04 16:33:27 +01:00 (rev 13360)
@@ -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
@@ -49,8 +50,12 @@
#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) \
@@ -91,18 +96,17 @@
" 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"
|