Merge remote branch 'origin/master' into nv50-compiler
[mesa.git] / src / mesa / math / m_debug_util.h
index 1b7d742a80b63697b4a444abb9d584aabbb3706e..ed11c849ecebe43b91bee05d630fca4c9dbb46ea 100644 (file)
@@ -29,7 +29,7 @@
 #define __M_DEBUG_UTIL_H__
 
 
-#ifdef DEBUG  /* This code only used for debugging */
+#ifdef DEBUG_MATH  /* This code only used for debugging */
 
 
 /* Comment this out to deactivate the cycle counter.
@@ -61,7 +61,7 @@ extern long counter_overhead;
  */
 extern char *mesa_profile;
 
-/* Modify the the number of tests if you like.
+/* Modify the number of tests if you like.
  * We take the minimum of all results, because every error should be
  * positive (time used by other processes, task switches etc).
  * It is assumed that all calculations are done in the cache.
@@ -185,7 +185,7 @@ extern char *mesa_profile;
 
 #endif
 
-#elif defined(__amd64__)
+#elif defined(__x86_64__)
 
 #define rdtscll(val) do { \
      unsigned int a,d; \
@@ -231,8 +231,8 @@ extern char *mesa_profile;
 #define  BEGIN_RACE(x)                                                        \
 x = LONG_MAX;                                                                 \
 for (cycle_i = 0; cycle_i <10; cycle_i++) {                                   \
-   register long cycle_tmp1 asm("l0");                                       \
-   register long cycle_tmp2 asm("l1");                                       \
+   register long cycle_tmp1 __asm__("l0");                                   \
+   register long cycle_tmp2 __asm__("l1");                                   \
    /* rd %tick, %l0 */                                                       \
    __asm__ __volatile__ (".word 0xa1410000" : "=r" (cycle_tmp1));  /*  save timestamp   */
 
@@ -303,7 +303,7 @@ enum { NIL = 0, ONE = 1, NEG = -1, VAR = 2 };
  */
 #if defined(__GNUC__)
 #  define ALIGN16(type, array) type array __attribute__ ((aligned (16)))
-#elif defined(__MSC__)
+#elif defined(_MSC_VER)
 #  define ALIGN16(type, array) type array __declspec(align(16)) /* GH: Does this work? */
 #elif defined(__WATCOMC__)
 #  define ALIGN16(type, array)                     /* Watcom does not support this */ 
@@ -315,6 +315,6 @@ enum { NIL = 0, ONE = 1, NEG = -1, VAR = 2 };
 #endif
 
 
-#endif /* DEBUG */
+#endif /* DEBUG_MATH */
 
 #endif /* __M_DEBUG_UTIL_H__ */