diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2009-07-02 19:32:07 +0900 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-09 16:06:39 -0500 |
commit | a3ece1ca24035d6b59864a072c50ef85e3564690 (patch) | |
tree | 53d56051c2a09096e239a34316c798b7a59649f8 /ioport.c | |
parent | bd458840f705e86c92d8740324b941d26e8dddd6 (diff) | |
download | qemu-a3ece1ca24035d6b59864a072c50ef85e3564690.tar.gz qemu-a3ece1ca24035d6b59864a072c50ef85e3564690.tar.bz2 qemu-a3ece1ca24035d6b59864a072c50ef85e3564690.zip |
use constant IOPORTS_MASK instead of 0xffff.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ioport.c')
-rw-r--r-- | ioport.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -94,7 +94,7 @@ static uint32_t default_ioport_readw(void *opaque, uint32_t address) { uint32_t data; data = ioport_read(0, address); - address = (address + 1) & (MAX_IOPORTS - 1); + address = (address + 1) & IOPORTS_MASK; data |= ioport_read(0, address) << 8; return data; } @@ -102,7 +102,7 @@ static uint32_t default_ioport_readw(void *opaque, uint32_t address) static void default_ioport_writew(void *opaque, uint32_t address, uint32_t data) { ioport_write(0, address, data & 0xff); - address = (address + 1) & (MAX_IOPORTS - 1); + address = (address + 1) & IOPORTS_MASK; ioport_write(0, address, (data >> 8) & 0xff); } |