diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-09-09 01:08:34 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | 16aaaa19a3ef4220726007d3e644ced0c9e06513 (patch) | |
tree | 6a7c2fc91bc362559b079afbb10dc247d7bcbae0 /executor/executor.h | |
parent | de48503aef098d855754ab6f85558402130188d7 (diff) |
Allow referencing code in imported file (right now for function calls, allow calling a function in another file)
Diffstat (limited to 'executor/executor.h')
-rw-r--r-- | executor/executor.h | 3 |
1 files changed, 2 insertions, 1 deletions
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); |