diff --git a/sourcepawn/vm/jit/x86/jit_x86.cpp b/sourcepawn/vm/jit/x86/jit_x86.cpp index b4b39f59..e4b77213 100644 --- a/sourcepawn/vm/jit/x86/jit_x86.cpp +++ b/sourcepawn/vm/jit/x86/jit_x86.cpp @@ -1068,6 +1068,14 @@ inline void WriteOp_Retn(JitWriter *jit) IA32_Jump_Reg(jit, AMX_REG_TMP); } +inline void WriteOp_Call(JitWriter *jit) +{ + cell_t offs = jit->read_cell(); + + jitoffs_t jmp = IA32_Call_Imm32(jit, 0); + IA32_Write_Jump32(jit, jmp, RelocLookup(jit, offs, false)); +} + inline void WriteOp_Bounds(JitWriter *jit) { Write_BoundsCheck(jit); diff --git a/sourcepawn/vm/jit/x86/opcode_helpers.h b/sourcepawn/vm/jit/x86/opcode_helpers.h index 7df128bc..c0b502e8 100644 --- a/sourcepawn/vm/jit/x86/opcode_helpers.h +++ b/sourcepawn/vm/jit/x86/opcode_helpers.h @@ -107,7 +107,7 @@ typedef enum OP_PROC, //DONE OP_RET, // !GEN OP_RETN, //DONE - OP_CALL, + OP_CALL, //DONE OP_CALL_PRI, // !GEN OP_JUMP, //DONE OP_JREL, // !GEN diff --git a/sourcepawn/vm/jit/x86/opcode_switch.inc b/sourcepawn/vm/jit/x86/opcode_switch.inc index e3551f5c..f4b49b5a 100644 --- a/sourcepawn/vm/jit/x86/opcode_switch.inc +++ b/sourcepawn/vm/jit/x86/opcode_switch.inc @@ -628,6 +628,11 @@ WriteOp_Casetbl(jit); break; } + case OP_CALL: + { + WriteOp_Call(jit); + break; + } #if defined USE_UNGEN_OPCODES #include "ungen_opcode_switch.inc" #endif