From: Julian Seward Date: Mon, 4 Jan 2010 12:10:24 +0000 (+0000) Subject: Analysis/make-it-work for arm-linux. X-Git-Tag: svn/VALGRIND_3_6_0~410 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db42582f80125990a08d039736a2a41a00e0ff99;p=thirdparty%2Fvalgrind.git Analysis/make-it-work for arm-linux. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11014 --- diff --git a/memcheck/tests/partiallydefinedeq.c b/memcheck/tests/partiallydefinedeq.c index 888240ea48..7d63126cba 100644 --- a/memcheck/tests/partiallydefinedeq.c +++ b/memcheck/tests/partiallydefinedeq.c @@ -57,9 +57,16 @@ int main ( void ) // Note: on ppc32/64 the second call to foo() does give an error, // since the expensive EQ/NE scheme does not apply to the CmpORD // primops used by ppc. -static void bar ( void ) +// +// On arm, the "normal" (x86-like) comparison primops are used, so +// the expensive EQ/NE scheme could apply. However, it doesn't, +// because the constant 0x80808080 is placed in a constant pool +// and so never appears as a literal, and so the instrumenter +// never spots it and so doesn't use the expensive scheme (for foo). +// Hence also on ARM we get 3 errors, not 2. +static __attribute__((noinline)) void bar ( void ) { -#if defined(__powerpc__) || defined(__powerpc64__) - fprintf(stderr, "Currently running on ppc32/64: this test should give 3 errors, not 2.\n"); +#if defined(__powerpc__) || defined(__powerpc64__) || defined(__arm__) + fprintf(stderr, "Currently running on ppc32/64/arm: this test should give 3 errors, not 2.\n"); #endif } diff --git a/memcheck/tests/partiallydefinedeq.stderr.exp2 b/memcheck/tests/partiallydefinedeq.stderr.exp2 index 3b81c251bc..19b46ae8c5 100644 --- a/memcheck/tests/partiallydefinedeq.stderr.exp2 +++ b/memcheck/tests/partiallydefinedeq.stderr.exp2 @@ -1,5 +1,5 @@ -Currently running on ppc32/64: this test should give 3 errors, not 2. +Currently running on ppc32/64/arm: this test should give 3 errors, not 2. Conditional jump or move depends on uninitialised value(s) at 0x........: foo (partiallydefinedeq.c:15) by 0x........: main (partiallydefinedeq.c:37) @@ -22,4 +22,3 @@ For a detailed leak analysis, rerun with: --leak-check=full For counts of detected and suppressed errors, rerun with: -v Use --track-origins=yes to see where uninitialised values come from ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) -