308ede9da8
to optimize away the loop used for timing. Do something in the loop for arm that can't be optimized away, and will also meet the 1,000 instructions in the loop requirement. This allows mhz to calculate sensible Mhz on a StrongArm (228Mhz rather than 56Mhz) Other hardware probably also need fixing, as gcc probably applies the same optimizations on them. Also bump PKGREVISION.
13 lines
412 B
Text
13 lines
412 B
Text
$NetBSD: patch-ar,v 1.1 2008/04/05 14:09:18 chris Exp $
|
|
|
|
--- src/mhz.c.orig 2008-04-05 14:34:31.000000000 +0100
|
|
+++ src/mhz.c 2008-04-05 14:33:40.000000000 +0100
|
|
@@ -118,6 +118,8 @@ main(ac, av)
|
|
*/
|
|
#ifdef sparc
|
|
# define FOUR a >>= 1; a >>= 1; a >>= 1; a >>= 1;
|
|
+#elif defined(__arm__)
|
|
+# define FOUR a++; a >>= 1; a++; a >>= 1;
|
|
#else
|
|
# ifdef _AIX /* really for the rs6000 only */
|
|
# define FOUR a++; a++;
|