From cd79d221137d7e3fa893f1edca502f95b41f713a Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Sat, 16 Feb 2019 19:42:04 +0000 Subject: [PATCH] fixes for 32-bit mode only compilation --- bochs/cpu/avx/avx512.cc | 2 +- bochs/cpu/decoder/fetchdecode_opmap.h | 4 ++++ bochs/cpu/vmx.cc | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bochs/cpu/avx/avx512.cc b/bochs/cpu/avx/avx512.cc index 025f3d42f..aa32ea743 100644 --- a/bochs/cpu/avx/avx512.cc +++ b/bochs/cpu/avx/avx512.cc @@ -2,7 +2,7 @@ // $Id$ ///////////////////////////////////////////////////////////////////////// // -// Copyright (c) 2013-2018 Stanislav Shwartsman +// Copyright (c) 2013-2019 Stanislav Shwartsman // Written by Stanislav Shwartsman [sshwarts at sourceforge net] // // This library is free software; you can redistribute it and/or diff --git a/bochs/cpu/decoder/fetchdecode_opmap.h b/bochs/cpu/decoder/fetchdecode_opmap.h index 830bdea7b..f387178f2 100644 --- a/bochs/cpu/decoder/fetchdecode_opmap.h +++ b/bochs/cpu/decoder/fetchdecode_opmap.h @@ -1628,7 +1628,9 @@ static const Bit64u BxOpcodeTable0F20[] = { // opcode 0F 21 static const Bit64u BxOpcodeTable0F21[] = { +#if BX_SUPPORT_X86_64 form_opcode(ATTR_IS64, BX_IA_MOV_RqDq), +#endif last_opcode(ATTR_IS32, BX_IA_MOV_RdDd) }; @@ -1648,7 +1650,9 @@ static const Bit64u BxOpcodeTable0F22[] = { // opcode 0F 23 static const Bit64u BxOpcodeTable0F23[] = { +#if BX_SUPPORT_X86_64 form_opcode(ATTR_IS64, BX_IA_MOV_DqRq), +#endif last_opcode(ATTR_IS32, BX_IA_MOV_DdRd) }; diff --git a/bochs/cpu/vmx.cc b/bochs/cpu/vmx.cc index 0ea2b6b39..9020a762b 100644 --- a/bochs/cpu/vmx.cc +++ b/bochs/cpu/vmx.cc @@ -2317,11 +2317,10 @@ void BX_CPU_C::VMexitLoadHostState(void) { VMCS_HOST_STATE *host_state = &BX_CPU_THIS_PTR vmcs.host_state; bx_bool x86_64_host = 0; - Bit32u vmexit_ctrls = BX_CPU_THIS_PTR vmcs.vmexit_ctrls; - BX_CPU_THIS_PTR tsc_offset = 0; #if BX_SUPPORT_X86_64 + Bit32u vmexit_ctrls = BX_CPU_THIS_PTR vmcs.vmexit_ctrls; if (vmexit_ctrls & VMX_VMEXIT_CTRL1_HOST_ADDR_SPACE_SIZE) { BX_DEBUG(("VMEXIT to x86-64 host")); x86_64_host = 1;