mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
10l, pointers aren't always 32bit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14364 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
ac3f45b742
commit
7c9dd9352d
@ -233,15 +233,15 @@ static uint32_t SAVED_CONFIG_CNTL = 0;
|
||||
#define GETREG(TYPE,PTR,OFFZ) (*((volatile TYPE*)((PTR)+(OFFZ))))
|
||||
#define SETREG(TYPE,PTR,OFFZ,VAL) (*((volatile TYPE*)((PTR)+(OFFZ))))=VAL
|
||||
|
||||
#define INREG8(addr) GETREG(uint8_t,(uint32_t)(radeon_mmio_base),addr)
|
||||
#define OUTREG8(addr,val) SETREG(uint8_t,(uint32_t)(radeon_mmio_base),addr,val)
|
||||
#define INREG8(addr) GETREG(uint8_t,(uint8_t*)(radeon_mmio_base),addr)
|
||||
#define OUTREG8(addr,val) SETREG(uint8_t,(uint8_t*)(radeon_mmio_base),addr,val)
|
||||
|
||||
static inline uint32_t INREG (uint32_t addr) {
|
||||
uint32_t tmp = GETREG(uint32_t,(uint32_t)(radeon_mmio_base),addr);
|
||||
uint32_t tmp = GETREG(uint32_t,(uint8_t*)(radeon_mmio_base),addr);
|
||||
return le2me_32(tmp);
|
||||
}
|
||||
//#define OUTREG(addr,val) SETREG(uint32_t,(uint32_t)(radeon_mmio_base),addr,val)
|
||||
#define OUTREG(addr,val) SETREG(uint32_t,(uint32_t)(radeon_mmio_base),addr,le2me_32(val))
|
||||
//#define OUTREG(addr,val) SETREG(uint32_t,(uint8_t*)(radeon_mmio_base),addr,val)
|
||||
#define OUTREG(addr,val) SETREG(uint32_t,(uint8_t*)(radeon_mmio_base),addr,le2me_32(val))
|
||||
#define OUTREGP(addr,val,mask) \
|
||||
do { \
|
||||
unsigned int _tmp = INREG(addr); \
|
||||
|
Loading…
Reference in New Issue
Block a user