following many users requests - allow sandy bridge configuration even when AVX is not compiled in, just disable AVX in it
This commit is contained in:
parent
4f2a23602b
commit
8e750e27c8
@ -28,7 +28,7 @@
|
||||
|
||||
#define LOG_THIS cpu->
|
||||
|
||||
#if BX_SUPPORT_X86_64 && BX_SUPPORT_AVX
|
||||
#if BX_SUPPORT_X86_64
|
||||
|
||||
corei7_sandy_bridge_2600k_t::corei7_sandy_bridge_2600k_t(BX_CPU_C *cpu): bx_cpuid_t(cpu)
|
||||
{
|
||||
@ -143,7 +143,9 @@ Bit64u corei7_sandy_bridge_2600k_t::get_isa_extensions_bitmask(void) const
|
||||
BX_ISA_XSAVE |
|
||||
BX_ISA_XSAVEOPT |
|
||||
BX_ISA_AES_PCLMULQDQ |
|
||||
#if BX_SUPPORT_AVX
|
||||
BX_ISA_AVX |
|
||||
#endif
|
||||
BX_ISA_CMPXCHG16B |
|
||||
BX_ISA_LM_LAHF_SAHF;
|
||||
}
|
||||
@ -317,8 +319,10 @@ void corei7_sandy_bridge_2600k_t::get_std_cpuid_leaf_1(cpuid_function_t *leaf) c
|
||||
BX_CPUID_EXT_POPCNT |
|
||||
BX_CPUID_EXT_TSC_DEADLINE |
|
||||
BX_CPUID_EXT_AES |
|
||||
BX_CPUID_EXT_XSAVE |
|
||||
BX_CPUID_EXT_AVX;
|
||||
BX_CPUID_EXT_XSAVE;
|
||||
#if BX_SUPPORT_AVX
|
||||
leaf->ecx |= BX_CPUID_EXT_AVX;
|
||||
#endif
|
||||
if (cpu->cr4.get_OSXSAVE())
|
||||
leaf->ecx |= BX_CPUID_EXT_OSXSAVE;
|
||||
|
||||
@ -613,10 +617,18 @@ void corei7_sandy_bridge_2600k_t::get_std_cpuid_xsave_leaf(Bit32u subfunction, c
|
||||
// ECX - Maximum size (in bytes) required by CPU supported features
|
||||
// EDX - valid bits of XCR0 (upper part)
|
||||
leaf->eax = cpu->xcr0_suppmask;
|
||||
|
||||
leaf->ebx = 512+64;
|
||||
#if BX_SUPPORT_AVX
|
||||
if (cpu->xcr0.get_YMM())
|
||||
leaf->ebx = XSAVE_YMM_STATE_OFFSET + XSAVE_YMM_STATE_LEN;
|
||||
#endif
|
||||
|
||||
leaf->ecx = 512+64;
|
||||
#if BX_SUPPORT_AVX
|
||||
leaf->ecx = XSAVE_YMM_STATE_OFFSET + XSAVE_YMM_STATE_LEN;
|
||||
#endif
|
||||
|
||||
leaf->edx = 0;
|
||||
return;
|
||||
|
||||
@ -627,12 +639,14 @@ void corei7_sandy_bridge_2600k_t::get_std_cpuid_xsave_leaf(Bit32u subfunction, c
|
||||
leaf->edx = 0;
|
||||
return;
|
||||
|
||||
#if BX_SUPPORT_AVX
|
||||
case 2: // YMM leaf
|
||||
leaf->eax = XSAVE_YMM_STATE_LEN;
|
||||
leaf->ebx = XSAVE_YMM_STATE_OFFSET;
|
||||
leaf->ecx = 0;
|
||||
leaf->edx = 0;
|
||||
return;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -24,7 +24,7 @@
|
||||
#ifndef BX_COREI7_SANDY_BRIDGE_2600K_CPUID_DEFINITIONS_H
|
||||
#define BX_COREI7_SANDY_BRIDGE_2600K_CPUID_DEFINITIONS_H
|
||||
|
||||
#if BX_SUPPORT_X86_64 && BX_SUPPORT_AVX
|
||||
#if BX_SUPPORT_X86_64
|
||||
|
||||
#include "cpu/cpuid.h"
|
||||
|
||||
@ -66,6 +66,6 @@ private:
|
||||
|
||||
extern bx_cpuid_t *create_corei7_sandy_bridge_2600k_cpuid(BX_CPU_C *cpu);
|
||||
|
||||
#endif // BX_SUPPORT_X86_64 && BX_SUPPORT_AVX
|
||||
#endif // BX_SUPPORT_X86_64
|
||||
|
||||
#endif
|
||||
|
@ -40,10 +40,10 @@ bx_define_cpudb(phenom_8650_toliman)
|
||||
bx_define_cpudb(core2_penryn_t9600)
|
||||
bx_define_cpudb(corei5_lynnfield_750)
|
||||
bx_define_cpudb(corei5_arrandale_m520)
|
||||
bx_define_cpudb(corei7_sandy_bridge_2600k)
|
||||
#if BX_SUPPORT_AVX
|
||||
bx_define_cpudb(zambezi)
|
||||
bx_define_cpudb(trinity_apu)
|
||||
bx_define_cpudb(corei7_sandy_bridge_2600k)
|
||||
bx_define_cpudb(corei7_ivy_bridge_3770k)
|
||||
bx_define_cpudb(corei7_haswell_4770)
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user