From 1bf90c16c2aec63f0abc00477ebb2447191d55c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Mon, 9 May 2011 16:19:24 +0000 Subject: [PATCH] add rdtsc instruction to full core as well for consistency Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3709 --- src/cpu/core_full/load.h | 7 +++++++ src/cpu/core_full/optable.h | 4 ++-- src/cpu/core_full/support.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/cpu/core_full/load.h b/src/cpu/core_full/load.h index c644a1ab..cd620add 100644 --- a/src/cpu/core_full/load.h +++ b/src/cpu/core_full/load.h @@ -500,6 +500,13 @@ l_M_Ed: case D_ICEBP: CPU_SW_Interrupt_NoIOPLCheck(1,GetIP()); continue; + case D_RDTSC: { + if (CPU_ArchitectureType>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; diff --git a/src/cpu/core_full/optable.h b/src/cpu/core_full/optable.h index affeb6ea..81eb94ae 100644 --- a/src/cpu/core_full/optable.h +++ b/src/cpu/core_full/optable.h @@ -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 }, diff --git a/src/cpu/core_full/support.h b/src/cpu/core_full/support.h index 6478a79c..a6b12079 100644 --- a/src/cpu/core_full/support.h +++ b/src/cpu/core_full/support.h @@ -64,6 +64,7 @@ enum { D_CPUID, D_HLT,D_CLTS, D_LOCK,D_ICEBP, + D_RDTSC, L_ERROR };