Fix SR macros mis-use. Need to add assertion into bxlist_c and check that it has no 2 params with same name inside !
This commit is contained in:
parent
8ed8916ea9
commit
9269288319
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: proc_ctrl.cc,v 1.153 2006-06-12 16:58:27 sshwarts Exp $
|
||||
// $Id: proc_ctrl.cc,v 1.154 2006-06-14 16:44:33 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -698,7 +698,7 @@ void BX_CPU_C::MOV_RdCd(bxInstruction_c *i)
|
||||
val_32 = 0;
|
||||
break;
|
||||
case 2: /* CR2 */
|
||||
BX_DEBUG(("MOV_RdCd: reading CR3"));
|
||||
BX_DEBUG(("MOV_RdCd: reading CR2"));
|
||||
val_32 = BX_CPU_THIS_PTR cr2;
|
||||
break;
|
||||
case 3: // CR3
|
||||
@ -706,7 +706,7 @@ void BX_CPU_C::MOV_RdCd(bxInstruction_c *i)
|
||||
val_32 = BX_CPU_THIS_PTR cr3;
|
||||
break;
|
||||
case 4: // CR4
|
||||
#if BX_CPU_LEVEL == 3
|
||||
#if BX_CPU_LEVEL < 4
|
||||
val_32 = 0;
|
||||
BX_INFO(("MOV_RdCd: read of CR4 causes #UD"));
|
||||
UndefinedOpcode(i);
|
||||
@ -764,6 +764,8 @@ void BX_CPU_C::MOV_CqRq(bxInstruction_c *i)
|
||||
BX_PANIC(("MOV_CqRq: CR1 not implemented yet"));
|
||||
break;
|
||||
case 2: /* CR2 */
|
||||
BX_DEBUG(("MOV_CqRq: write to CR2 of %08x:%08x",
|
||||
(Bit32u)(val_64 >> 32), (Bit32u)(val_64 & 0xFFFFFFFF)));
|
||||
BX_CPU_THIS_PTR cr2 = val_64;
|
||||
break;
|
||||
case 3: // CR3
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: dma.cc,v 1.39 2006-05-29 22:33:38 sshwarts Exp $
|
||||
// $Id: dma.cc,v 1.40 2006-06-14 16:44:33 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -42,8 +42,7 @@
|
||||
|
||||
bx_dma_c *theDmaDevice = NULL;
|
||||
|
||||
int
|
||||
libdma_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
|
||||
int libdma_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
|
||||
{
|
||||
theDmaDevice = new bx_dma_c ();
|
||||
bx_devices.pluginDmaDevice = theDmaDevice;
|
||||
@ -55,13 +54,13 @@ void libdma_LTX_plugin_fini(void)
|
||||
{
|
||||
}
|
||||
|
||||
bx_dma_c::bx_dma_c(void)
|
||||
bx_dma_c::bx_dma_c()
|
||||
{
|
||||
put("DMA");
|
||||
settype(DMALOG);
|
||||
}
|
||||
|
||||
bx_dma_c::~bx_dma_c(void)
|
||||
bx_dma_c::~bx_dma_c()
|
||||
{
|
||||
BX_DEBUG(("Exit"));
|
||||
}
|
||||
@ -123,7 +122,7 @@ unsigned bx_dma_c::get_TC(void)
|
||||
void bx_dma_c::init(void)
|
||||
{
|
||||
unsigned c, i, j;
|
||||
BX_DEBUG(("Init $Id: dma.cc,v 1.39 2006-05-29 22:33:38 sshwarts Exp $"));
|
||||
BX_DEBUG(("Init $Id: dma.cc,v 1.40 2006-06-14 16:44:33 sshwarts Exp $"));
|
||||
|
||||
/* 8237 DMA controller */
|
||||
|
||||
@ -224,7 +223,7 @@ void bx_dma_c::register_state(void)
|
||||
bx_list_c *extpg = new bx_list_c(list, "ext_page", 16);
|
||||
for (i=0; i<16; i++) {
|
||||
sprintf(name, "0x%02x", 0x80+i);
|
||||
BXRS_HEX_PARAM_FIELD(extpg, name, BX_DMA_THIS ext_page_reg[i]);
|
||||
new bx_shadow_num_c(extpg, name, &BX_DMA_THIS ext_page_reg[i], BASE_HEX);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pci2isa.cc,v 1.34 2006-05-29 22:33:38 sshwarts Exp $
|
||||
// $Id: pci2isa.cc,v 1.35 2006-06-14 16:44:33 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -155,7 +155,7 @@ void bx_pci2isa_c::register_state(void)
|
||||
bx_list_c *pci_conf = new bx_list_c(list, "pci_conf", 256);
|
||||
for (i=0; i<256; i++) {
|
||||
sprintf(name, "0x%02x", i);
|
||||
BXRS_HEX_PARAM_FIELD(pci_conf, name, BX_P2I_THIS s.pci_conf[i]);
|
||||
new bx_shadow_num_c(pci_conf, name, &BX_P2I_THIS s.pci_conf[i], BASE_HEX);
|
||||
}
|
||||
BXRS_HEX_PARAM_FIELD(list, elcr1, BX_P2I_THIS s.elcr1);
|
||||
BXRS_HEX_PARAM_FIELD(list, elcr2, BX_P2I_THIS s.elcr2);
|
||||
@ -166,12 +166,12 @@ void bx_pci2isa_c::register_state(void)
|
||||
bx_list_c *irqr = new bx_list_c(list, "irq_registry", 16);
|
||||
for (i=0; i<16; i++) {
|
||||
sprintf(name, "%d", i);
|
||||
BXRS_HEX_PARAM_FIELD(irqr, name, BX_P2I_THIS s.irq_registry[i]);
|
||||
new bx_shadow_num_c(irqr, name, &BX_P2I_THIS s.irq_registry[i]);
|
||||
}
|
||||
bx_list_c *irql = new bx_list_c(list, "irq_level", 16);
|
||||
for (i=0; i<16; i++) {
|
||||
sprintf(name, "%d", i);
|
||||
BXRS_HEX_PARAM_FIELD(irql, name, BX_P2I_THIS s.irq_level[i]);
|
||||
new bx_shadow_num_c(irql, name, &BX_P2I_THIS s.irq_level[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pci_ide.cc,v 1.25 2006-05-29 22:33:38 sshwarts Exp $
|
||||
// $Id: pci_ide.cc,v 1.26 2006-06-14 16:44:33 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -146,7 +146,7 @@ void bx_pci_ide_c::register_state(void)
|
||||
bx_list_c *pci_conf = new bx_list_c(list, "pci_conf", 256);
|
||||
for (i=0; i<256; i++) {
|
||||
sprintf(name, "0x%02x", i);
|
||||
BXRS_HEX_PARAM_FIELD(pci_conf, name, BX_PIDE_THIS s.pci_conf[i]);
|
||||
new bx_shadow_num_c(pci_conf, name, &BX_PIDE_THIS s.pci_conf[i], BASE_HEX);
|
||||
}
|
||||
|
||||
new bx_shadow_data_c(list, "buffer0", BX_PIDE_THIS s.bmdma[0].buffer, 0x20000);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pcivga.cc,v 1.11 2006-05-29 22:33:38 sshwarts Exp $
|
||||
// $Id: pcivga.cc,v 1.12 2006-06-14 16:44:33 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002,2003 Mike Nordell
|
||||
@ -118,7 +118,7 @@ void bx_pcivga_c::register_state(void)
|
||||
bx_list_c *pci_conf = new bx_list_c(list, "pci_conf", 256);
|
||||
for (i=0; i<256; i++) {
|
||||
sprintf(name, "0x%02x", i);
|
||||
BXRS_HEX_PARAM_FIELD(pci_conf, name, BX_PCIVGA_THIS s.pci_conf[i]);
|
||||
new bx_shadow_num_c(pci_conf, name, &BX_PCIVGA_THIS s.pci_conf[i], BASE_HEX);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user