Implemented CR4 register for Winchip. Currently only Time Stamp Disable (TSD) has an effect.

Fixed stupid bug in WRMSR - MSRs can now be written with values other than zero.
This commit is contained in:
TomW 2014-08-23 16:28:16 +01:00
commit 262b188790
6 changed files with 49 additions and 2 deletions

View file

@ -6,6 +6,11 @@ static int opRDTSC(uint32_t fetchdat)
x86illegal();
return 0;
}
if ((cr4 & CR4_TSD) && CPL)
{
x86gpf("RDTSC when TSD set and CPL != 0", 0);
return 0;
}
EAX = tsc & 0xffffffff;
EDX = tsc >> 32;
cycles--;