fleroviux / lunatic

ARM to x86-64 dynamic recompiler engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

X64Backend: do not emit micro block skip/epilogue code if micro block is unconditional.

fleroviux opened this issue · comments

Relevant code:

code->jmp(label_done);
// If the micro block was skipped advance PC by the number of instructions in it.
code->L(label_skip);
if (basic_block.key.Thumb()) {
code->add(
dword[rcx + state.GetOffsetToGPR(Mode::User, GPR::PC)],
micro_block.length * sizeof(u16)
);
} else {
code->add(
dword[rcx + state.GetOffsetToGPR(Mode::User, GPR::PC)],
micro_block.length * sizeof(u32)
);
}
code->L(label_done);