diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-02 17:47:02 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-02 17:47:02 +0000 |
commit | e64d7d595f9454d29de7110e3ec6591105c8e467 (patch) | |
tree | 26eaa11fc8ea8b8817b0e6e99fabaa8af196973a /hw/sbi.c | |
parent | 0e8f096751f279a8de01d9c66c87911ec431fa4c (diff) | |
download | qemu-e64d7d595f9454d29de7110e3ec6591105c8e467.zip qemu-e64d7d595f9454d29de7110e3ec6591105c8e467.tar.gz qemu-e64d7d595f9454d29de7110e3ec6591105c8e467.tar.bz2 |
Remove address masking
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5853 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sbi.c')
-rw-r--r-- | hw/sbi.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -46,7 +46,6 @@ typedef struct SBIState { } SBIState; #define SBI_SIZE (SBI_NREGS * 4) -#define SBI_MASK (SBI_SIZE - 1) static void sbi_check_interrupts(void *opaque) { @@ -65,7 +64,7 @@ static uint32_t sbi_mem_readl(void *opaque, target_phys_addr_t addr) SBIState *s = opaque; uint32_t saddr, ret; - saddr = (addr & SBI_MASK) >> 2; + saddr = addr >> 2; switch (saddr) { default: ret = s->regs[saddr]; @@ -81,7 +80,7 @@ static void sbi_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val) SBIState *s = opaque; uint32_t saddr; - saddr = (addr & SBI_MASK) >> 2; + saddr = addr >> 2; DPRINTF("write system reg 0x" TARGET_FMT_plx " = %x\n", addr, val); switch (saddr) { default: |