diff --git a/bochs/cpu/cpu.h b/bochs/cpu/cpu.h index 1787da75e..952e20af9 100644 --- a/bochs/cpu/cpu.h +++ b/bochs/cpu/cpu.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: cpu.h,v 1.291 2006-05-13 12:49:45 sshwarts Exp $ +// $Id: cpu.h,v 1.292 2006-05-15 18:00:55 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -181,14 +181,6 @@ #define BX_READ_16BIT_REG(index) (BX_CPU_THIS_PTR gen_reg[index].word.rx) #define BX_READ_32BIT_REG(index) (BX_CPU_THIS_PTR gen_reg[index].dword.erx) -#define BX_READ_16BIT_BASE_REG(var, index) {\ - var = *BX_CPU_THIS_PTR _16bit_base_reg[index];\ -} - -#define BX_READ_16BIT_INDEX_REG(var, index) {\ - var = *BX_CPU_THIS_PTR _16bit_index_reg[index];\ -} - #define BX_WRITE_16BIT_REG(index, val) {\ BX_CPU_THIS_PTR gen_reg[index].word.rx = val; \ } @@ -1144,11 +1136,6 @@ public: // for now... volatile bx_bool smi_pending; volatile bx_bool nmi_pending; - // for accessing registers by index number - Bit16u *_16bit_base_reg[8]; - Bit16u *_16bit_index_reg[8]; - Bit32u empty_register; - // // for decoding instructions; accessing seg reg's by index unsigned sreg_mod00_rm16[8]; diff --git a/bochs/cpu/init.cc b/bochs/cpu/init.cc index ae7de4081..7ffccc83e 100644 --- a/bochs/cpu/init.cc +++ b/bochs/cpu/init.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: init.cc,v 1.101 2006-05-01 18:24:47 vruppert Exp $ +// $Id: init.cc,v 1.102 2006-05-15 18:00:55 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -158,33 +158,6 @@ void BX_CPU_C::initialize(BX_MEM_C *addrspace) // in SMP mode, the prefix of the CPU will be changed to [CPUn] in // bx_local_apic_c::set_id as soon as the apic ID is assigned. - /* hack for the following fields. Its easier to decode mod-rm bytes if - you can assume there's always a base & index register used. For - modes which don't really use them, point to an empty (zeroed) register. - */ - empty_register = 0; - - // 16bit address mode base register, used for mod-rm decoding - - _16bit_base_reg[0] = &gen_reg[BX_16BIT_REG_BX].word.rx; - _16bit_base_reg[1] = &gen_reg[BX_16BIT_REG_BX].word.rx; - _16bit_base_reg[2] = &gen_reg[BX_16BIT_REG_BP].word.rx; - _16bit_base_reg[3] = &gen_reg[BX_16BIT_REG_BP].word.rx; - _16bit_base_reg[4] = (Bit16u*) &empty_register; - _16bit_base_reg[5] = (Bit16u*) &empty_register; - _16bit_base_reg[6] = &gen_reg[BX_16BIT_REG_BP].word.rx; - _16bit_base_reg[7] = &gen_reg[BX_16BIT_REG_BX].word.rx; - - // 16bit address mode index register, used for mod-rm decoding - _16bit_index_reg[0] = &gen_reg[BX_16BIT_REG_SI].word.rx; - _16bit_index_reg[1] = &gen_reg[BX_16BIT_REG_DI].word.rx; - _16bit_index_reg[2] = &gen_reg[BX_16BIT_REG_SI].word.rx; - _16bit_index_reg[3] = &gen_reg[BX_16BIT_REG_DI].word.rx; - _16bit_index_reg[4] = &gen_reg[BX_16BIT_REG_SI].word.rx; - _16bit_index_reg[5] = &gen_reg[BX_16BIT_REG_DI].word.rx; - _16bit_index_reg[6] = (Bit16u*) &empty_register; - _16bit_index_reg[7] = (Bit16u*) &empty_register; - // // for decoding instructions: access to seg reg's via index number sreg_mod00_rm16[0] = BX_SEG_REG_DS;