diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-09-18 01:15:29 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-09-18 01:15:29 +0000 |
commit | aef445bd7e46d2d47701a03c5478da34b3d53c4c (patch) | |
tree | 0f9a7993dad66b412e857a25f6cd56f3313e7a37 /hw/ppc.c | |
parent | 6787f5fae0fb9e3923b8c316780645c3e1d81df2 (diff) |
Merge common ISA access routines.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2159 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc.c')
-rw-r--r-- | hw/ppc.c | 58 |
1 files changed, 0 insertions, 58 deletions
@@ -201,64 +201,6 @@ void cpu_ppc_reset (CPUState *env) } #endif -static void PPC_io_writeb (void *opaque, target_phys_addr_t addr, uint32_t value) -{ - cpu_outb(NULL, addr & 0xffff, value); -} - -static uint32_t PPC_io_readb (void *opaque, target_phys_addr_t addr) -{ - uint32_t ret = cpu_inb(NULL, addr & 0xffff); - return ret; -} - -static void PPC_io_writew (void *opaque, target_phys_addr_t addr, uint32_t value) -{ -#ifdef TARGET_WORDS_BIGENDIAN - value = bswap16(value); -#endif - cpu_outw(NULL, addr & 0xffff, value); -} - -static uint32_t PPC_io_readw (void *opaque, target_phys_addr_t addr) -{ - uint32_t ret = cpu_inw(NULL, addr & 0xffff); -#ifdef TARGET_WORDS_BIGENDIAN - ret = bswap16(ret); -#endif - return ret; -} - -static void PPC_io_writel (void *opaque, target_phys_addr_t addr, uint32_t value) -{ -#ifdef TARGET_WORDS_BIGENDIAN - value = bswap32(value); -#endif - cpu_outl(NULL, addr & 0xffff, value); -} - -static uint32_t PPC_io_readl (void *opaque, target_phys_addr_t addr) -{ - uint32_t ret = cpu_inl(NULL, addr & 0xffff); - -#ifdef TARGET_WORDS_BIGENDIAN - ret = bswap32(ret); -#endif - return ret; -} - -CPUWriteMemoryFunc *PPC_io_write[] = { - &PPC_io_writeb, - &PPC_io_writew, - &PPC_io_writel, -}; - -CPUReadMemoryFunc *PPC_io_read[] = { - &PPC_io_readb, - &PPC_io_readw, - &PPC_io_readl, -}; - /*****************************************************************************/ /* Debug port */ void PPC_debug_write (void *opaque, uint32_t addr, uint32_t val) |