|
From: <sv...@va...> - 2009-12-31 13:49:45
|
Author: sewardj
Date: 2009-12-31 13:31:50 +0000 (Thu, 31 Dec 2009)
New Revision: 10979
Log:
Some fixes, to allow memcheck and 'none' tests to build on arm-linux.
Modified:
branches/ARM/memcheck/tests/atomic_incs.c
branches/ARM/tests/arch_test.c
Modified: branches/ARM/memcheck/tests/atomic_incs.c
===================================================================
--- branches/ARM/memcheck/tests/atomic_incs.c 2009-12-31 13:31:11 UTC (rev 10978)
+++ branches/ARM/memcheck/tests/atomic_incs.c 2009-12-31 13:31:50 UTC (rev 10979)
@@ -42,7 +42,7 @@
);
#elif defined(VGA_ppc32)
/* Nasty hack. Does correctly atomically do *p += n, but only if p
- is 8-aligned -- guaranteed by caller. */
+ is 4-aligned -- guaranteed by caller. */
unsigned long success;
do {
__asm__ __volatile__(
@@ -74,6 +74,8 @@
: /*trash*/ "memory", "cc", "r15"
);
} while (success != 1);
+#elif defined(VGA_arm)
+ *p += n;
#else
# error "Unsupported arch"
#endif
@@ -136,6 +138,8 @@
: /*trash*/ "memory", "cc", "r15"
);
} while (success != 1);
+#elif defined(VGA_arm)
+ *p += n;
#else
# error "Unsupported arch"
#endif
@@ -195,6 +199,8 @@
: /*trash*/ "memory", "cc", "r15"
);
} while (success != 1);
+#elif defined(VGA_arm)
+ *p += n;
#else
# error "Unsupported arch"
#endif
@@ -202,7 +208,7 @@
__attribute__((noinline)) void atomic_add_64bit ( long long int* p, int n )
{
-#if defined(VGA_x86) || defined(VGA_ppc32)
+#if defined(VGA_x86) || defined(VGA_ppc32) || defined(VGA_arm)
/* do nothing; is not supported */
#elif defined(VGA_amd64)
// this is a bit subtle. It relies on the fact that, on a 64-bit platform,
Modified: branches/ARM/tests/arch_test.c
===================================================================
--- branches/ARM/tests/arch_test.c 2009-12-31 13:31:11 UTC (rev 10978)
+++ branches/ARM/tests/arch_test.c 2009-12-31 13:31:50 UTC (rev 10979)
@@ -55,6 +55,9 @@
if ( 0 == strcmp( arch, "ppc32" ) ) return True;
}
+#elif defined(VGP_arm_linux)
+ if ( 0 == strcmp( arch, "arm" ) ) return True;
+
#else
# error Unknown platform
#endif // VGP_*
|