From: Petar Jovanovic Date: Thu, 4 Apr 2013 15:33:27 +0000 (+0000) Subject: mips: enable helgrind test tc08_hbl2 for mips64 X-Git-Tag: svn/VALGRIND_3_9_0~324 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ef5cae5e09bf6bdbe67fcb214c0c4ef67eb9b03;p=thirdparty%2Fvalgrind.git mips: enable helgrind test tc08_hbl2 for mips64 Enable the test for mips64. Minor improvement in macro INC. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13360 --- diff --git a/helgrind/tests/tc08_hbl2.c b/helgrind/tests/tc08_hbl2.c index b39f9ee711..54a1f683d7 100644 --- a/helgrind/tests/tc08_hbl2.c +++ b/helgrind/tests/tc08_hbl2.c @@ -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"