code cleanup in stack16/32.cc

This commit is contained in:
Stanislav Shwartsman 2007-11-18 18:52:44 +00:00
parent 57d2d14865
commit 090dd61a1e
2 changed files with 42 additions and 44 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: stack16.cc,v 1.24 2007-11-18 18:49:19 sshwarts Exp $
// $Id: stack16.cc,v 1.25 2007-11-18 18:52:44 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -139,6 +139,26 @@ void BX_CPU_C::POP_EwR(bxInstruction_c *i)
BX_WRITE_16BIT_REG(i->rm(), val16);
}
void BX_CPU_C::PUSH_Iw(bxInstruction_c *i)
{
push_16(i->Iw());
}
void BX_CPU_C::PUSH_EwM(bxInstruction_c *i)
{
Bit16u op1_16;
/* pointer, segment address pair */
read_virtual_word(i->seg(), RMAddr(i), &op1_16);
push_16(op1_16);
}
void BX_CPU_C::PUSH_EwR(bxInstruction_c *i)
{
push_16(BX_READ_16BIT_REG(i->rm()));
}
#if BX_CPU_LEVEL >= 3
void BX_CPU_C::PUSHAD16(bxInstruction_c *i)
{
@ -209,23 +229,3 @@ void BX_CPU_C::POPAD16(bxInstruction_c *i)
AX = ax;
}
#endif
void BX_CPU_C::PUSH_Iw(bxInstruction_c *i)
{
push_16(i->Iw());
}
void BX_CPU_C::PUSH_EwM(bxInstruction_c *i)
{
Bit16u op1_16;
/* pointer, segment address pair */
read_virtual_word(i->seg(), RMAddr(i), &op1_16);
push_16(op1_16);
}
void BX_CPU_C::PUSH_EwR(bxInstruction_c *i)
{
push_16(BX_READ_16BIT_REG(i->rm()));
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: stack32.cc,v 1.37 2007-11-18 18:49:19 sshwarts Exp $
// $Id: stack32.cc,v 1.38 2007-11-18 18:52:44 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -157,7 +157,26 @@ void BX_CPU_C::POP32_SS(bxInstruction_c *i)
BX_CPU_THIS_PTR async_event = 1;
}
#if BX_CPU_LEVEL >= 2
void BX_CPU_C::PUSH_Id(bxInstruction_c *i)
{
push_32(i->Id());
}
void BX_CPU_C::PUSH_EdM(bxInstruction_c *i)
{
Bit32u op1_32;
/* pointer, segment address pair */
read_virtual_dword(i->seg(), RMAddr(i), &op1_32);
push_32(op1_32);
}
void BX_CPU_C::PUSH_EdR(bxInstruction_c *i)
{
push_32(BX_READ_32BIT_REG(i->rm()));
}
void BX_CPU_C::PUSHAD32(bxInstruction_c *i)
{
Bit32u temp_ESP = ESP;
@ -226,27 +245,6 @@ void BX_CPU_C::POPAD32(bxInstruction_c *i)
ECX = ecx;
EAX = eax;
}
#endif
void BX_CPU_C::PUSH_Id(bxInstruction_c *i)
{
push_32(i->Id());
}
void BX_CPU_C::PUSH_EdM(bxInstruction_c *i)
{
Bit32u op1_32;
/* pointer, segment address pair */
read_virtual_dword(i->seg(), RMAddr(i), &op1_32);
push_32(op1_32);
}
void BX_CPU_C::PUSH_EdR(bxInstruction_c *i)
{
push_32(BX_READ_32BIT_REG(i->rm()));
}
#if BX_CPU_LEVEL >= 2
void BX_CPU_C::ENTER_IwIb(bxInstruction_c *i)