- fixed repeat speedup optimization on big endian machines

This commit is contained in:
Volker Ruppert 2006-08-01 17:09:05 +00:00
parent d4219e4453
commit 8e85b8654b

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: io.cc,v 1.35 2006-06-09 22:29:07 sshwarts Exp $
// $Id: io.cc,v 1.36 2006-08-01 17:09:05 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -138,7 +138,11 @@ Bit32u BX_CPU_C::FastRepINSW(bxInstruction_c *i, bx_address dstOff, Bit16u port,
count += bx_devices.bulkIOQuantumsTransferred;
}
else {
#ifdef BX_LITTLE_ENDIAN
* (Bit16u *) hostAddrDst = temp16;
#else
* (Bit16u *) hostAddrDst = ((temp16 >> 8) | (temp16 << 8));
#endif
hostAddrDst += pointerDelta;
count++;
}
@ -248,7 +252,11 @@ Bit32u BX_CPU_C::FastRepOUTSW(bxInstruction_c *i, unsigned srcSeg, bx_address sr
else
bx_devices.bulkIOQuantumsRequested = 0;
Bit16u temp16 = * (Bit16u *) hostAddrSrc;
#ifdef BX_LITTLE_ENDIAN
BX_OUTP(port, temp16, 2);
#else
BX_OUTP(port, ((temp16 >> 8) | (temp16 << 8)), 2);
#endif
if (bx_devices.bulkIOQuantumsTransferred) {
hostAddrSrc = bx_devices.bulkIOHostAddr;
count += bx_devices.bulkIOQuantumsTransferred;