summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/memops.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/memops.h b/src/mesa/drivers/dri/common/memops.h
new file mode 100644
index 00000000000..4952d788e81
--- /dev/null
+++ b/src/mesa/drivers/dri/common/memops.h
@@ -0,0 +1,17 @@
+#ifndef DRIMEMSETIO_H
+#define DRIMEMSETIO_H
+/*
+* memset an area in I/O space
+* We need to be careful about this on some archs
+*/
+static __inline__ void drimemsetio(void* address, int c, int size)
+{
+#if defined(__powerpc__) || defined(__ia64__)
+ int i;
+ for(i=0;i<size;i++)
+ *((char *)address + i)=c;
+#else
+ memset(address,c,size);
+#endif
+}
+#endif