hasting2 02/11/12 16:17:37
Modified: live/gcc3/gcc timevar.c
Log:
Fix for Darwin/x86 compatibility with PPC timing machinery upgrade.
Revision Changes Path
1.14 +7 -3 src/live/gcc3/gcc/timevar.c
Index: timevar.c
===================================================================
RCS file: /cvs/Darwin/src/live/gcc3/gcc/timevar.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- timevar.c 2002/11/08 23:20:06 1.13
+++ timevar.c 2002/11/13 00:17:37 1.14
@@ -34,9 +34,11 @@
/* APPLE LOCAL begin Mach time */
#ifdef HAVE_MACH_MACH_TIME_H
#include <mach/mach_time.h>
-#define HAVE_MACH_TIME
+#define HAVE_MACH_TIME 1
static double timeBaseRatio;
static struct mach_timebase_info tbase;
+#else
+#define HAVE_MACH_TIME 0
#endif
/* APPLE LOCAL end Mach time */
@@ -89,7 +91,8 @@
/* APPLE LOCAL begin Mach time */
/* On Darwin, prefer getrusage, plus Mach absolute time for the wall
clock time. Use PPC intrinsics if possible. */
-#if defined(__APPLE__) && defined(__POWERPC__) && defined(HAVE_MACH_TIME)
+#if defined(__APPLE__) && defined(__POWERPC__) && HAVE_MACH_TIME
+#if __POWERPC__
# include <ppc_intrinsics.h>
# define HAVE_WALL_TIME
# define USE_PPC_INTRINSICS
@@ -103,13 +106,14 @@
} while (hi != __mftbu());
return (hi * 0x100000000ull + lo) * timeBaseRatio;
}
+#endif /* __POWERPC__ */
#elif HAVE_MACH_TIME
# define USE_GETRUSAGE
# define USE_MACH_TIME
# define HAVE_USER_TIME
# define HAVE_SYS_TIME
# define HAVE_WALL_TIME
-#else
+# else
/* APPLE LOCAL end Mach time */
#ifdef HAVE_TIMES
# define USE_TIMES