Enabled LAHF/SAHF for x86-64 mode

This commit is contained in:
Stanislav Shwartsman 2006-01-17 19:50:42 +00:00
parent 83300a66dd
commit c8cd1f805a
2 changed files with 12 additions and 8 deletions

View File

@ -340,7 +340,11 @@ void BX_CPU_C::CPUID(bxInstruction_c *i)
RDX = features | (1 << 29) | (1 << 27) | (1 << 25) |
(1 << 22) | (1 << 20) | (1 << 11);
RBX = 0;
RCX = 0;
// RCX:
// [0:0] LAHF/SAHF available in 64-bit mode
// [1:31] Reserved
RCX = 1;
break;
// Processor Brand String, use the value given

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: fetchdecode64.cc,v 1.86 2005-11-11 22:02:42 sshwarts Exp $
// $Id: fetchdecode64.cc,v 1.87 2006-01-17 19:50:42 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -686,8 +686,8 @@ static BxOpcodeInfo_t BxOpcodeInfo64[512*3] = {
/* 9B */ { 0, &BX_CPU_C::FWAIT },
/* 9C */ { 0, &BX_CPU_C::PUSHF_Fw },
/* 9D */ { 0, &BX_CPU_C::POPF_Fw },
/* 9E */ { 0, &BX_CPU_C::BxError },
/* 9F */ { 0, &BX_CPU_C::BxError },
/* 9E */ { 0, &BX_CPU_C::SAHF },
/* 9F */ { 0, &BX_CPU_C::LAHF },
/* A0 */ { BxImmediate_O, &BX_CPU_C::MOV_ALOq },
/* A1 */ { BxImmediate_O, &BX_CPU_C::MOV_AXOq },
/* A2 */ { BxImmediate_O, &BX_CPU_C::MOV_OqAL },
@ -1207,8 +1207,8 @@ static BxOpcodeInfo_t BxOpcodeInfo64[512*3] = {
/* 9B */ { 0, &BX_CPU_C::FWAIT },
/* 9C */ { 0, &BX_CPU_C::PUSHF_Fq },
/* 9D */ { 0, &BX_CPU_C::POPF_Fq },
/* 9E */ { 0, &BX_CPU_C::BxError },
/* 9F */ { 0, &BX_CPU_C::BxError },
/* 9E */ { 0, &BX_CPU_C::SAHF },
/* 9F */ { 0, &BX_CPU_C::LAHF },
/* A0 */ { BxImmediate_O, &BX_CPU_C::MOV_ALOq },
/* A1 */ { BxImmediate_O, &BX_CPU_C::MOV_EAXOq },
/* A2 */ { BxImmediate_O, &BX_CPU_C::MOV_OqAL },
@ -1728,8 +1728,8 @@ static BxOpcodeInfo_t BxOpcodeInfo64[512*3] = {
/* 9B */ { 0, &BX_CPU_C::FWAIT },
/* 9C */ { 0, &BX_CPU_C::PUSHF_Fq },
/* 9D */ { 0, &BX_CPU_C::POPF_Fq },
/* 9E */ { 0, &BX_CPU_C::BxError },
/* 9F */ { 0, &BX_CPU_C::BxError },
/* 9E */ { 0, &BX_CPU_C::SAHF },
/* 9F */ { 0, &BX_CPU_C::LAHF },
/* A0 */ { BxImmediate_O, &BX_CPU_C::MOV_ALOq },
/* A1 */ { BxImmediate_O, &BX_CPU_C::MOV_RAXOq },
/* A2 */ { BxImmediate_O, &BX_CPU_C::MOV_OqAL },