Try to cleanup/rewrite RepeatSpeedups optimization

This code doesn't add new speedups but makes it very easy
After some validation it could be no problem to enable repeat speedups optimization for REP MOVSx with any address size. And REP STOSx too.
This commit is contained in:
Stanislav Shwartsman 2005-07-04 17:44:08 +00:00
parent d4871e66a9
commit 01d8a97613
2 changed files with 783 additions and 563 deletions

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: cpu.h,v 1.222 2005-06-16 17:24:50 sshwarts Exp $ // $Id: cpu.h,v 1.223 2005-07-04 17:44:08 sshwarts Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2001 MandrakeSoft S.A. // Copyright (C) 2001 MandrakeSoft S.A.
@ -2660,6 +2660,22 @@ public: // for now...
BX_SMF void branch_near64(bxInstruction_c *i) BX_CPP_AttrRegparmN(1); BX_SMF void branch_near64(bxInstruction_c *i) BX_CPP_AttrRegparmN(1);
#endif #endif
#if BX_SupportRepeatSpeedups
BX_SMF Bit32u FastRepMOVSB(bxInstruction_c *i, unsigned srcSeg, bx_address srcOff,
unsigned dstSeg, bx_address dstOff, Bit32u count);
BX_SMF Bit32u FastRepMOVSW(bxInstruction_c *i, unsigned srcSeg, bx_address srcOff,
unsigned dstSeg, bx_address dstOff, Bit32u count);
BX_SMF Bit32u FastRepMOVSD(bxInstruction_c *i, unsigned srcSeg, bx_address srcOff,
unsigned dstSeg, bx_address dstOff, Bit32u count);
BX_SMF Bit32u FastRepSTOSB(bxInstruction_c *i, unsigned dstSeg, bx_address dstOff,
Bit8u val, Bit32u count);
BX_SMF Bit32u FastRepSTOSW(bxInstruction_c *i, unsigned dstSeg, bx_address dstOff,
Bit16u val, Bit32u count);
BX_SMF Bit32u FastRepSTOSD(bxInstruction_c *i, unsigned dstSeg, bx_address dstOff,
Bit32u val, Bit32u count);
#endif
BX_SMF void access_linear(bx_address address, unsigned length, unsigned pl, BX_SMF void access_linear(bx_address address, unsigned length, unsigned pl,
unsigned rw, void *data) BX_CPP_AttrRegparmN(3); unsigned rw, void *data) BX_CPP_AttrRegparmN(3);
BX_SMF Bit32u translate_linear(bx_address laddr, BX_SMF Bit32u translate_linear(bx_address laddr,

File diff suppressed because it is too large Load Diff