Mercurial > mplayer.hg
changeset 7996:e81526dfe3d8
INREG now static inline instead of a define, to avoid unnecessary GETREG
calls while byteswapping.
author | colin |
---|---|
date | Thu, 31 Oct 2002 10:57:07 +0000 |
parents | 04f386daac34 |
children | 253162f19e43 |
files | vidix/drivers/mach64_vid.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vidix/drivers/mach64_vid.c Thu Oct 31 10:42:20 2002 +0000 +++ b/vidix/drivers/mach64_vid.c Thu Oct 31 10:57:07 2002 +0000 @@ -130,7 +130,11 @@ #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) \