Optimize NDR uop_CALL_INSTRUCTION_FUNC by loading the fetchdat in one uOP instead of two

Another 3-5% NDR improvement noticed on the WOLF3D MAPEDIT idle loop as a result.
This commit is contained in:
Cacodemon345
2025-05-05 13:01:49 +06:00
parent 5584eb31a4
commit 0446e3c3f1
6 changed files with 12 additions and 5 deletions

View File

@@ -219,6 +219,11 @@ codegen_CALL_FUNC_RESULT(codeblock_t *block, uop_t *uop)
static int
codegen_CALL_INSTRUCTION_FUNC(codeblock_t *block, uop_t *uop)
{
# if _WIN64
host_x86_MOV32_REG_IMM(block, REG_ECX, uop->imm_data);
# else
host_x86_MOV32_REG_IMM(block, REG_EDI, uop->imm_data);
# endif
host_x86_CALL(block, uop->p);
host_x86_TEST32_REG(block, REG_EAX, REG_EAX);
host_x86_JNZ(block, codegen_exit_rout);