CR4.TSD flag support (Matt Schulkind)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1556 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2005-08-21 10:28:44 +00:00
parent 1e8a7cfd11
commit ecada8a2dd
2 changed files with 6 additions and 2 deletions

View file

@ -2328,7 +2328,10 @@ void helper_invlpg(target_ulong addr)
void helper_rdtsc(void)
{
uint64_t val;
if ((env->cr[4] & CR4_TSD_MASK) && ((env->hflags & HF_CPL_MASK) != 0)) {
raise_exception(EXCP0D_GPF);
}
val = cpu_get_tsc(env);
EAX = (uint32_t)(val);
EDX = (uint32_t)(val >> 32);