summaryrefslogtreecommitdiffstats
path: root/vidix/drivers/mach64_vid.c
diff options
context:
space:
mode:
authorcolin <colin@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-31 10:57:07 +0000
committercolin <colin@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-31 10:57:07 +0000
commit5c87e3bbccdd2562f55591e688831b9218e1a224 (patch)
treee6cd6b7027bd1bf0447de9cd99a1d2c1d4577009 /vidix/drivers/mach64_vid.c
parent0fe5b1bda4aa775030796afaa5c2d9ddf9be232b (diff)
downloadmpv-5c87e3bbccdd2562f55591e688831b9218e1a224.tar.bz2
mpv-5c87e3bbccdd2562f55591e688831b9218e1a224.tar.xz
INREG now static inline instead of a define, to avoid unnecessary GETREG
calls while byteswapping. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7997 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vidix/drivers/mach64_vid.c')
-rw-r--r--vidix/drivers/mach64_vid.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/vidix/drivers/mach64_vid.c b/vidix/drivers/mach64_vid.c
index 4843f0ecbb..5f3228235d 100644
--- a/vidix/drivers/mach64_vid.c
+++ b/vidix/drivers/mach64_vid.c
@@ -130,7 +130,11 @@ static uint32_t SAVED_OVERLAY_GRAPHICS_KEY_CLR;
#define INREG8(addr) GETREG(uint8_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2)
#define OUTREG8(addr,val) SETREG(uint8_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2,val)
-#define INREG(addr) le2me_32(GETREG(uint32_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2))
+
+static inline uint32_t INREG (uint32_t addr) {
+ uint32_t tmp = GETREG(uint32_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2);
+ return le2me_32(tmp);
+}
#define OUTREG(addr,val) SETREG(uint32_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2,le2me_32(val))
#define OUTREGP(addr,val,mask) \