X86Tables: Move Second ModRM table to be constexpr

This commit is contained in:
Ryan Houdek committed 2025-08-27 12:24:25 -07:00
1 parent e8c576047f
commit 1a2b2f8870
4 files changed
+7 -10

No files matched your search

@@ -4793,6 +4793,10 @@ void OpDispatchBuilder::UMWaitOp(OpcodeArgs) {
}
void OpDispatchBuilder::CLZeroOp(OpcodeArgs) {
if (!CTX->HostFeatures.SupportsCLZERO) {
UnimplementedOp(Op);
return;
}
Ref DestMem = LoadSource(GPRClass, Op, Op->Src[0], Op->Flags, {.LoadData = false});
_CacheLineZero(DestMem);
}
@@ -4943,10 +4947,6 @@ void OpDispatchBuilder::InstallHostSpecificOpcodeHandlers() {
};
#undef OPD
constexpr static DispatchTableEntry SecondaryModRMExtensionOp_CLZero[] = {
{((3 << 3) | 4), 1, &OpDispatchBuilder::CLZeroOp},
};
#define OPD(map_select, pp, opcode) (((map_select - 1) << 10) | (pp << 8) | (opcode))
static constexpr DispatchTableEntry AVXTable[] = {
{OPD(1, 0b00, 0x10), 1, &OpDispatchBuilder::VMOVUPS_VMOVUPDOp},
@@ -5369,10 +5369,6 @@ void OpDispatchBuilder::InstallHostSpecificOpcodeHandlers() {
};
#undef OPD
if (CTX->HostFeatures.SupportsCLZERO) {
InstallToTable(FEXCore::X86Tables::SecondModRMTableOps, SecondaryModRMExtensionOp_CLZero);
}
if (CTX->HostFeatures.SupportsAVX && CTX->HostFeatures.SupportsSVE256) {
InstallToTable(FEXCore::X86Tables::VEXTableOps, AVXTable);
InstallToTable(FEXCore::X86Tables::VEXTableGroupOps, VEXTableGroupOps);