| 68 | } |
| 69 | |
| 70 | Decoder::Decoder(FEXCore::Core::InternalThreadState* Thread) |
| 71 | : Thread {Thread} |
| 72 | , CTX {static_cast<FEXCore::Context::ContextImpl*>(Thread->CTX)} |
| 73 | , OSABI {CTX->SyscallHandler ? CTX->SyscallHandler->GetOSABI() : FEXCore::HLE::SyscallOSABI::OS_UNKNOWN} |
| 74 | , PoolObject {CTX->FrontendAllocator, sizeof(FEXCore::X86Tables::DecodedInst) * DefaultDecodedBufferSize} { |
| 75 | |
| 76 | FEX_CONFIG_OPT(ReducedPrecision, X87REDUCEDPRECISION); |
| 77 | if (ReducedPrecision) { |
| 78 | X87Table = &FEXCore::X86Tables::X87F64Ops; |
| 79 | } else { |
| 80 | X87Table = &FEXCore::X86Tables::X87F80Ops; |
| 81 | } |
| 82 | |
| 83 | if (CTX->HostFeatures.SupportsAVX && CTX->HostFeatures.SupportsSVE256) { |
| 84 | VEXTable = &FEXCore::X86Tables::VEXTableOps; |
| 85 | VEXTableGroup = &FEXCore::X86Tables::VEXTableGroupOps; |
| 86 | } else if (CTX->HostFeatures.SupportsAVX) { |
| 87 | VEXTable = &FEXCore::X86Tables::VEXTableOps_AVX128; |
| 88 | VEXTableGroup = &FEXCore::X86Tables::VEXTableGroupOps_AVX128; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | bool Decoder::CheckRangeExecutable(uint64_t Address, uint64_t Size) { |
| 93 | // Treat FEX-internal X86 callbacks as always executable |