1
0
Fork 0

dynamic core optimizations;

incorporate patch from esaelon, parts of ih8regs optimizations;
thanks to kekko for several ideas


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2300
This commit is contained in:
Sebastian Strohhäcker 2005-09-03 19:20:08 +00:00
parent 406935348a
commit 06135e8beb
4 changed files with 502 additions and 286 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: paging.h,v 1.17 2005-09-03 11:38:18 c2woody Exp $ */
/* $Id: paging.h,v 1.18 2005-09-03 19:20:08 c2woody Exp $ */
#ifndef DOSBOX_PAGING_H
#define DOSBOX_PAGING_H
@ -162,7 +162,6 @@ INLINE Bit16u mem_readw_inline(PhysPt address) {
} else return mem_unalignedreadw(address);
}
INLINE Bit32u mem_readd_inline(PhysPt address) {
if (!(address & 3)) {
Bitu index=(address>>12);
@ -197,4 +196,41 @@ INLINE void mem_writed_inline(PhysPt address,Bit32u val) {
} else mem_unalignedwrited(address,val);
}
INLINE Bit16u mem_readw_dyncorex86(PhysPt address) {
if ((address & 0xfff)<0xfff) {
Bitu index=(address>>12);
if (paging.tlb.read[index]) return host_readw(paging.tlb.read[index]+address);
else return paging.tlb.handler[index]->readw(address);
} else return mem_unalignedreadw(address);
}
INLINE Bit32u mem_readd_dyncorex86(PhysPt address) {
if ((address & 0xfff)<0xffd) {
Bitu index=(address>>12);
if (paging.tlb.read[index]) return host_readd(paging.tlb.read[index]+address);
else return paging.tlb.handler[index]->readd(address);
} else return mem_unalignedreadd(address);
}
INLINE void mem_writew_dyncorex86(PhysPt address,Bit16u val) {
if ((address & 0xfff)<0xfff) {
Bitu index=(address>>12);
if (paging.tlb.write[index]) host_writew(paging.tlb.write[index]+address,val);
else paging.tlb.handler[index]->writew(address,val);
} else mem_unalignedwritew(address,val);
}
INLINE void mem_writed_dyncorex86(PhysPt address,Bit32u val) {
if ((address & 0xfff)<0xffd) {
Bitu index=(address>>12);
if (paging.tlb.write[index]) host_writed(paging.tlb.write[index]+address,val);
else paging.tlb.handler[index]->writed(address,val);
} else mem_unalignedwrited(address,val);
}
#endif