summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-26 14:11:50 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-26 14:15:53 -0700
commit7f4bec264e8180609846379da6f63555fc2eafef (patch)
treeaa2fb5c82aed169b166cf5017859deb68e26d083 /src/mesa/pipe/cell
parent65df0241465b2dae4979d71cad17b83cfd1fda11 (diff)
Cell: move ASSERT macro into common.h
Diffstat (limited to 'src/mesa/pipe/cell')
-rw-r--r--src/mesa/pipe/cell/common.h11
-rw-r--r--src/mesa/pipe/cell/spu/spu_main.h9
2 files changed, 11 insertions, 9 deletions
diff --git a/src/mesa/pipe/cell/common.h b/src/mesa/pipe/cell/common.h
index f9edd0cc26..e925299119 100644
--- a/src/mesa/pipe/cell/common.h
+++ b/src/mesa/pipe/cell/common.h
@@ -38,6 +38,17 @@
#include "pipe/p_format.h"
+/** The standard assert macro doesn't seem to work reliably */
+#define ASSERT(x) \
+ if (!(x)) { \
+ ubyte *p = NULL; \
+ fprintf(stderr, "%s:%d: %s(): assertion %s failed.\n", \
+ __FILE__, __LINE__, __FUNCTION__, #x); \
+ *p = 0; \
+ exit(1); \
+ }
+
+
/** for sanity checking */
#define ASSERT_ALIGN16(ptr) \
assert((((unsigned long) (ptr)) & 0xf) == 0);
diff --git a/src/mesa/pipe/cell/spu/spu_main.h b/src/mesa/pipe/cell/spu/spu_main.h
index e4359bf60d..5bc5d9fa99 100644
--- a/src/mesa/pipe/cell/spu/spu_main.h
+++ b/src/mesa/pipe/cell/spu/spu_main.h
@@ -86,15 +86,6 @@ extern struct spu_global spu;
#define TAG_MISC 18
-/** The standard assert macro doesn't seem to work on SPUs */
-#define ASSERT(x) \
- if (!(x)) { \
- fprintf(stderr, "SPU %d: %s:%d: %s(): assertion %s failed.\n", \
- spu.init.id, __FILE__, __LINE__, __FUNCTION__, #x); \
- exit(1); \
- }
-
-
extern void
wait_on_mask(unsigned tag);