add rdtsc instruction to full core as well for consistency
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3709
This commit is contained in:
parent
c2ba5b3639
commit
1bf90c16c2
3 changed files with 10 additions and 2 deletions
|
@ -500,6 +500,13 @@ l_M_Ed:
|
|||
case D_ICEBP:
|
||||
CPU_SW_Interrupt_NoIOPLCheck(1,GetIP());
|
||||
continue;
|
||||
case D_RDTSC: {
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_PENTIUMSLOW) goto illegalopcode;
|
||||
Bit64s tsc=(Bit64s)(PIC_FullIndex()*(double)CPU_CycleMax);
|
||||
reg_edx=(Bit32u)(tsc>>32);
|
||||
reg_eax=(Bit32u)(tsc&0xffffffff);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG(LOG_CPU,LOG_ERROR)("LOAD:Unhandled code %d opcode %X",inst.code.load,inst.entry);
|
||||
goto illegalopcode;
|
||||
|
|
|
@ -234,7 +234,7 @@ static OpCode OpCodeTable[1024]={
|
|||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
|
||||
/* 0x130 - 0x137 */
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{D_RDTSC ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
|
@ -590,7 +590,7 @@ static OpCode OpCodeTable[1024]={
|
|||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
|
||||
/* 0x330 - 0x337 */
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{D_RDTSC ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
|
|
|
@ -64,6 +64,7 @@ enum {
|
|||
D_CPUID,
|
||||
D_HLT,D_CLTS,
|
||||
D_LOCK,D_ICEBP,
|
||||
D_RDTSC,
|
||||
L_ERROR
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue