From 16aaaa19a3ef4220726007d3e644ced0c9e06513 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 9 Sep 2019 01:08:34 +0200 Subject: Allow referencing code in imported file (right now for function calls, allow calling a function in another file) --- executor/executor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'executor/executor.h') diff --git a/executor/executor.h b/executor/executor.h index a0be5c9..743500c 100644 --- a/executor/executor.h +++ b/executor/executor.h @@ -39,7 +39,8 @@ CHECK_RESULT int amal_exec_div(amal_executor *self, i8 dst_reg, i8 src_reg1, i8 CHECK_RESULT int amal_exec_push(amal_executor *self, i8 reg); CHECK_RESULT int amal_exec_pushi(amal_executor *self, i64 imm); CHECK_RESULT int amal_exec_pushd(amal_executor *self, BufferView data); -CHECK_RESULT int amal_exec_call(amal_executor *self, u16 func_index, u8 num_args, i8 dst_reg); +CHECK_RESULT int amal_exec_call(amal_executor *self, u32 code_offset, u8 num_args, i8 dst_reg); +void amal_exec_call_overwrite(amal_executor *self, u32 call_code_offset, i32 new_target_rel32); /*CHECK_RESULT int amal_exec_callr(i8 dst_reg, BufferView data);*/ CHECK_RESULT int amal_exec_calle(amal_executor *self, void *func, u8 num_args, i8 dst_reg); CHECK_RESULT int amal_exec_cmp(amal_executor *self, i8 dst_reg, i8 src_reg1, i8 src_reg2); -- cgit v1.2.3