fix complation with minimalistic configuration which has no CPUID yet

This commit is contained in:
Stanislav Shwartsman 2024-10-22 20:55:33 +03:00
parent 60f8ab2a36
commit 5bff389409
3 changed files with 19 additions and 3 deletions

View File

@ -2558,7 +2558,11 @@ fetch_b1:
#ifndef BX_STANDALONE_DECODER #ifndef BX_STANDALONE_DECODER
#if BX_SUPPORT_EVEX
int assignHandler(bxInstruction_c *i, Bit32u fetchModeMask, bool allow_VL512) int assignHandler(bxInstruction_c *i, Bit32u fetchModeMask, bool allow_VL512)
#else
int assignHandler(bxInstruction_c *i, Bit32u fetchModeMask)
#endif
{ {
unsigned ia_opcode = i->getIaOpcode(); unsigned ia_opcode = i->getIaOpcode();

View File

@ -39,7 +39,11 @@ extern int fetchDecode32(const Bit8u *fetchPtr, bool is_32, bxInstruction_c *i,
#if BX_SUPPORT_X86_64 #if BX_SUPPORT_X86_64
extern int fetchDecode64(const Bit8u *fetchPtr, bxInstruction_c *i, unsigned remainingInPage); extern int fetchDecode64(const Bit8u *fetchPtr, bxInstruction_c *i, unsigned remainingInPage);
#endif #endif
#if BX_SUPPORT_EVEX
extern int assignHandler(bxInstruction_c *i, Bit32u fetchModeMask, bool allow_VL512); extern int assignHandler(bxInstruction_c *i, Bit32u fetchModeMask, bool allow_VL512);
#else
extern int assignHandler(bxInstruction_c *i, Bit32u fetchModeMask);
#endif
void flushICaches(void) void flushICaches(void)
{ {
@ -147,7 +151,11 @@ bxICacheEntry_c* BX_CPU_C::serveICacheMiss(Bit32u eipBiased, bx_phy_address pAdd
return entry; return entry;
} }
ret = assignHandler(i, BX_CPU_THIS_PTR fetchModeMask, BX_CPU_THIS_PTR cpuid->support_avx10_512()); ret = assignHandler(i, BX_CPU_THIS_PTR fetchModeMask
#if BX_SUPPORT_EVEX
, BX_CPU_THIS_PTR cpuid->support_avx10_512()
#endif
);
// add instruction to the trace // add instruction to the trace
unsigned iLen = i->ilen(); unsigned iLen = i->ilen();
@ -275,7 +283,11 @@ void BX_CPU_C::boundaryFetch(const Bit8u *fetchPtr, unsigned remainingInPage, bx
exception(BX_GP_EXCEPTION, 0); exception(BX_GP_EXCEPTION, 0);
} }
ret = assignHandler(i, BX_CPU_THIS_PTR fetchModeMask, BX_CPU_THIS_PTR cpuid->support_avx10_512()); ret = assignHandler(i, BX_CPU_THIS_PTR fetchModeMask
#if BX_SUPPORT_EVEX
, BX_CPU_THIS_PTR cpuid->support_avx10_512()
#endif
);
// Restore EIP since we fudged it to start at the 2nd page boundary. // Restore EIP since we fudged it to start at the 2nd page boundary.
RIP = BX_CPU_THIS_PTR prev_rip; RIP = BX_CPU_THIS_PTR prev_rip;

View File

@ -130,10 +130,10 @@ void BX_CPU_C::initialize(void)
#endif #endif
#if BX_SUPPORT_SVM #if BX_SUPPORT_SVM
BX_CPU_THIS_PTR svm_extensions_bitmask = BX_CPU_THIS_PTR cpuid->get_svm_extensions_bitmask(); BX_CPU_THIS_PTR svm_extensions_bitmask = BX_CPU_THIS_PTR cpuid->get_svm_extensions_bitmask();
#endif
#endif #endif
BX_CPU_THIS_PTR cpuid->sanity_checks(); BX_CPU_THIS_PTR cpuid->sanity_checks();
#endif
init_FetchDecodeTables(); // must be called after init_isa_features_bitmask() init_FetchDecodeTables(); // must be called after init_isa_features_bitmask()