mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
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>
This commit is contained in:
parent
3299397760
commit
d56dd6cf03
5 changed files with 16 additions and 15 deletions
4
ioport.c
4
ioport.c
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue