summaryrefslogtreecommitdiffstats
path: root/sys/mips/gxemul/mpreg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/mips/gxemul/mpreg.h')
-rw-r--r--sys/mips/gxemul/mpreg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/mips/gxemul/mpreg.h b/sys/mips/gxemul/mpreg.h
index e09946d..f562d07 100644
--- a/sys/mips/gxemul/mpreg.h
+++ b/sys/mips/gxemul/mpreg.h
@@ -43,10 +43,17 @@
#define GXEMUL_MP_DEV_IPI_READ 0x00c0
#define GXEMUL_MP_DEV_CYCLES 0x00d0
+#ifdef _LP64
#define GXEMUL_MP_DEV_FUNCTION(f) \
(volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_MP_DEV_BASE + (f))
#define GXEMUL_MP_DEV_READ(f) \
(volatile uint64_t)*GXEMUL_MP_DEV_FUNCTION(f)
+#else
+#define GXEMUL_MP_DEV_FUNCTION(f) \
+ (volatile uint32_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_MP_DEV_BASE + (f))
+#define GXEMUL_MP_DEV_READ(f) \
+ (volatile uint32_t)*GXEMUL_MP_DEV_FUNCTION(f)
+#endif
#define GXEMUL_MP_DEV_WRITE(f, v) \
*GXEMUL_MP_DEV_FUNCTION(f) = (v)
OpenPOWER on IntegriCloud