very small cleanups
This commit is contained in:
parent
6714f3f8c1
commit
bc381e51da
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: bcd.cc,v 1.24 2008-03-22 21:29:39 sshwarts Exp $
|
||||
// $Id: bcd.cc,v 1.25 2008-09-19 19:18:56 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -30,7 +30,7 @@
|
||||
#include "cpu.h"
|
||||
#define LOG_THIS BX_CPU_THIS_PTR
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::AAA(bxInstruction_c *)
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::AAA(bxInstruction_c *i)
|
||||
{
|
||||
/*
|
||||
* Note: This instruction incorrectly documented in Intel's materials.
|
||||
@ -78,7 +78,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::AAA(bxInstruction_c *)
|
||||
set_PF_base(AL);
|
||||
}
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::AAS(bxInstruction_c *)
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::AAS(bxInstruction_c *i)
|
||||
{
|
||||
/* AAS affects the following flags: A,C */
|
||||
|
||||
@ -137,7 +137,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::AAD(bxInstruction_c *i)
|
||||
SET_FLAGS_OSZAPC_LOGIC_8(AL);
|
||||
}
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::DAA(bxInstruction_c *)
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::DAA(bxInstruction_c *i)
|
||||
{
|
||||
Bit8u tmpAL = AL;
|
||||
int tmpCF = 0;
|
||||
@ -170,7 +170,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::DAA(bxInstruction_c *)
|
||||
set_CF(tmpCF);
|
||||
}
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::DAS(bxInstruction_c *)
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::DAS(bxInstruction_c *i)
|
||||
{
|
||||
/* The algorithm for DAS is fashioned after the pseudo code in the
|
||||
* Pentium Processor Family Developer's Manual, volume 3. It seems
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: cpu.h,v 1.527 2008-09-16 20:57:15 sshwarts Exp $
|
||||
// $Id: cpu.h,v 1.528 2008-09-19 19:18:56 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -1309,7 +1309,6 @@ public: // for now...
|
||||
BX_SMF void LAR_GvEw(bxInstruction_c *) BX_CPP_AttrRegparmN(1);
|
||||
BX_SMF void LSL_GvEw(bxInstruction_c *) BX_CPP_AttrRegparmN(1);
|
||||
BX_SMF void CLTS(bxInstruction_c *) BX_CPP_AttrRegparmN(1);
|
||||
BX_SMF void INVD(bxInstruction_c *) BX_CPP_AttrRegparmN(1);
|
||||
BX_SMF void WBINVD(bxInstruction_c *) BX_CPP_AttrRegparmN(1);
|
||||
BX_SMF void CLFLUSH(bxInstruction_c *) BX_CPP_AttrRegparmN(1);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: ia_opcodes.h,v 1.20 2008-09-06 21:10:40 sshwarts Exp $
|
||||
// $Id: ia_opcodes.h,v 1.21 2008-09-19 19:18:56 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2008 Stanislav Shwartsman
|
||||
@ -293,7 +293,7 @@ bx_define_opcode(BX_IA_INT_Ib, &BX_CPU_C::INT_Ib, NULL)
|
||||
bx_define_opcode(BX_IA_INT1, &BX_CPU_C::INT1, NULL)
|
||||
bx_define_opcode(BX_IA_INT3, &BX_CPU_C::INT3, NULL)
|
||||
bx_define_opcode(BX_IA_INTO, &BX_CPU_C::INTO, NULL)
|
||||
bx_define_opcode(BX_IA_INVD, &BX_CPU_C::INVD, NULL)
|
||||
bx_define_opcode(BX_IA_INVD, &BX_CPU_C::WBINVD, NULL)
|
||||
bx_define_opcode(BX_IA_INVLPG, &BX_CPU_C::INVLPG, NULL)
|
||||
bx_define_opcode(BX_IA_IRET16, &BX_CPU_C::IRET16, NULL)
|
||||
bx_define_opcode(BX_IA_IRET32, &BX_CPU_C::IRET32, NULL)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: proc_ctrl.cc,v 1.260 2008-09-16 19:20:03 sshwarts Exp $
|
||||
// $Id: proc_ctrl.cc,v 1.261 2008-09-19 19:18:56 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -137,48 +137,32 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CLTS(bxInstruction_c *i)
|
||||
BX_CPU_THIS_PTR cr0.set_TS(0);
|
||||
}
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::INVD(bxInstruction_c *i)
|
||||
{
|
||||
#if BX_CPU_LEVEL >= 4
|
||||
if (!real_mode() && CPL!=0) {
|
||||
BX_ERROR(("INVD: priveledge check failed, generate #GP(0)"));
|
||||
exception(BX_GP_EXCEPTION, 0, 0);
|
||||
}
|
||||
|
||||
invalidate_prefetch_q();
|
||||
|
||||
BX_DEBUG(("INVD: Flush internal caches !"));
|
||||
BX_INSTR_CACHE_CNTRL(BX_CPU_ID, BX_INSTR_INVD);
|
||||
|
||||
#if BX_SUPPORT_ICACHE
|
||||
flushICaches();
|
||||
#endif
|
||||
|
||||
#else
|
||||
BX_INFO(("INVD: required 486 support, use --enable-cpu-level=4 option"));
|
||||
exception(BX_UD_EXCEPTION, 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* 0F 08 INVD */
|
||||
/* 0F 09 WBINVD */
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::WBINVD(bxInstruction_c *i)
|
||||
{
|
||||
#if BX_CPU_LEVEL >= 4
|
||||
if (!real_mode() && CPL!=0) {
|
||||
BX_ERROR(("WBINVD: priveledge check failed, generate #GP(0)"));
|
||||
BX_ERROR(("INVD/WBINVD: priveledge check failed, generate #GP(0)"));
|
||||
exception(BX_GP_EXCEPTION, 0, 0);
|
||||
}
|
||||
|
||||
invalidate_prefetch_q();
|
||||
|
||||
BX_DEBUG(("WBINVD: Flush internal caches !"));
|
||||
BX_INSTR_CACHE_CNTRL(BX_CPU_ID, BX_INSTR_WBINVD);
|
||||
BX_DEBUG(("INVD/WBINVD: Flush internal caches !"));
|
||||
#if BX_INSTRUMENTATION
|
||||
if (i->b1() == 0x08)
|
||||
BX_INSTR_CACHE_CNTRL(BX_CPU_ID, BX_INSTR_INVD);
|
||||
else
|
||||
BX_INSTR_CACHE_CNTRL(BX_CPU_ID, BX_INSTR_WBINVD);
|
||||
#endif
|
||||
|
||||
#if BX_SUPPORT_ICACHE
|
||||
flushICaches();
|
||||
#endif
|
||||
|
||||
#else
|
||||
BX_INFO(("WBINVD: required 486 support, use --enable-cpu-level=4 option"));
|
||||
BX_INFO(("INVD/WBINVD: required 486 support, use --enable-cpu-level=4 option"));
|
||||
exception(BX_UD_EXCEPTION, 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: shift32.cc,v 1.46 2008-08-08 09:22:48 sshwarts Exp $
|
||||
// $Id: shift32.cc,v 1.47 2008-09-19 19:18:57 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -352,7 +352,6 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::RCR_EdM(bxInstruction_c *i)
|
||||
cf = (op1_32 >> (count - 1)) & 0x1;
|
||||
of = ((result_32 << 1) ^ result_32) >> 31; // of = result30 ^ result31
|
||||
SET_FLAGS_OxxxxC(of, cf);
|
||||
|
||||
}
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::RCR_EdR(bxInstruction_c *i)
|
||||
@ -384,7 +383,6 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::RCR_EdR(bxInstruction_c *i)
|
||||
cf = (op1_32 >> (count - 1)) & 0x1;
|
||||
of = ((result_32 << 1) ^ result_32) >> 31; // of = result30 ^ result31
|
||||
SET_FLAGS_OxxxxC(of, cf);
|
||||
|
||||
}
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::SHL_EdM(bxInstruction_c *i)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: sse.cc,v 1.62 2008-08-11 18:53:23 sshwarts Exp $
|
||||
// $Id: sse.cc,v 1.63 2008-09-19 19:18:57 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2003 Stanislav Shwartsman
|
||||
@ -1927,6 +1927,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::PACKSSDW_VdqWdq(bxInstruction_c *i)
|
||||
exception(BX_UD_EXCEPTION, 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* UNPCKLPD: 66 0F 14 */
|
||||
/* PUNPCKLQDQ: 66 0F 6C */
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::PUNPCKLQDQ_VdqWdq(bxInstruction_c *i)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: stack32.cc,v 1.56 2008-08-27 21:57:40 sshwarts Exp $
|
||||
// $Id: stack32.cc,v 1.57 2008-09-19 19:18:57 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -164,7 +164,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::PUSH_EdM(bxInstruction_c *i)
|
||||
{
|
||||
bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i));
|
||||
|
||||
Bit32u op1_32 = read_virtual_dword(i->seg(), eaddr);
|
||||
Bit32u op1_32 = read_virtual_dword_32(i->seg(), eaddr);
|
||||
|
||||
push_32(op1_32);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user