# HG changeset patch # User colin # Date 1036061827 0 # Node ID e81526dfe3d810726c238ec23d4642c1d98af7aa # Parent 04f386daac34e909ec49a8c8e9ffcd18c9bcd6bf INREG now static inline instead of a define, to avoid unnecessary GETREG calls while byteswapping. diff -r 04f386daac34 -r e81526dfe3d8 vidix/drivers/mach64_vid.c --- 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) \