diff options
author | gonzo <gonzo@FreeBSD.org> | 2013-09-04 20:34:36 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2013-09-04 20:34:36 +0000 |
commit | 1eec0c04d002462ffc14d1d3a0e51db88bcecc7b (patch) | |
tree | ada18ef269502d56adc3451a3fa29c4ebf6760c1 /sys/mips/gxemul | |
parent | 059527f86c1f6894818d8ea99339b92ad2f425a7 (diff) | |
download | FreeBSD-src-1eec0c04d002462ffc14d1d3a0e51db88bcecc7b.zip FreeBSD-src-1eec0c04d002462ffc14d1d3a0e51db88bcecc7b.tar.gz |
Add 32-bit support for Gxemul's oldtestmips machine emulation
Original work by: kan@
Diffstat (limited to 'sys/mips/gxemul')
-rw-r--r-- | sys/mips/gxemul/mpreg.h | 7 |
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) |