MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / Finalize

Method Finalize

FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp:3934–3955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3932}
3933
3934void OpDispatchBuilder::Finalize() {
3935 // This usually doesn't emit any IR but in the case of hitting the block instruction limit it will
3936 FlushRegisterCache();
3937 const auto GPRSize = GetGPROpSize();
3938
3939 // Node 0 is invalid node
3940 Ref RealNode = reinterpret_cast<Ref>(GetNode(1));
3941
3942 const FEXCore::IR::IROp_Header* IROp = RealNode->Op(DualListData.DataBegin());
3943 LOGMAN_THROW_A_FMT(IROp->Op == OP_IRHEADER, "First op in function must be our header");
3944
3945 // Let's walk the jump blocks and see if we have handled every block target
3946 for (auto& Handler : JumpTargets) {
3947 if (Handler.second.HaveEmitted) {
3948 continue;
3949 }
3950
3951 // We haven't emitted. Dump out to the dispatcher
3952 SetCurrentCodeBlock(Handler.second.BlockEntry);
3953 ExitFunction(_InlineEntrypointOffset(GPRSize, Handler.first - Entry));
3954 }
3955}
3956
3957uint8_t OpDispatchBuilder::GetDstSize(X86Tables::DecodedOp Op) const {
3958 const uint32_t DstSizeFlag = X86Tables::DecodeFlags::GetSizeDstFlags(Op->Flags);

Callers 2

InitializeCompilerMethod · 0.45
GenerateIRMethod · 0.45

Calls 3

GetNodeFunction · 0.85
OpMethod · 0.80
DataBeginMethod · 0.80

Tested by

no test coverage detected