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

Method BeginFunction

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

Source from the content-addressed store, hash-verified

3918}
3919
3920void OpDispatchBuilder::BeginFunction(uint64_t RIP, const fextl::vector<FEXCore::Frontend::Decoder::DecodedBlocks>* Blocks, uint32_t NumInstructions, bool _Is64BitMode, bool MonoBackpatcherBlock) {
3921 Entry = RIP;
3922 Is64BitMode = _Is64BitMode;
3923 LOGMAN_THROW_A_FMT(Is64BitMode == CTX->Config.Is64BitMode, "Expected operating mode to not change at runtime!");
3924 IsMonoBackpatcherBlock = MonoBackpatcherBlock;
3925 auto IRHeader = _IRHeader(InvalidNode, RIP, 0, NumInstructions, 0, 0);
3926 CreateJumpBlocks(Blocks);
3927
3928 auto Block = GetNewJumpBlock(RIP);
3929 SetCurrentCodeBlock(Block);
3930 IRHeader.first->Blocks = Block->Wrapped(DualListData.ListBegin());
3931 CurrentHeader = IRHeader.first;
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

Callers 1

GenerateIRMethod · 0.80

Calls 2

WrappedMethod · 0.80
ListBeginMethod · 0.80

Tested by

no test coverage detected