Get basic compilation working in Dynamic Pascal. - libjit.git - libjit

index : libjit.git
libjit
summary refs log tree commit diff
path: root/jit/jit-rules-interp.c
diff options
context:
space:
mode:
authorRhys Weatherley <rweather@southern-storm.com.au>2004年05月06日 11:09:37 +0000
committerRhys Weatherley <rweather@southern-storm.com.au>2004年05月06日 11:09:37 +0000
commit5ae84d58e467babe55849713faff2cc5d28f91e4 (patch)
tree47122166910745622a1fbe605cc9f067f9cd971b /jit/jit-rules-interp.c
parentf7741f514ce6c2e50a1b9dd8445a3274b92e1ec7 (diff)
downloadlibjit-5ae84d58e467babe55849713faff2cc5d28f91e4.tar.gz
Get basic compilation working in Dynamic Pascal.
Diffstat (limited to 'jit/jit-rules-interp.c')
-rw-r--r--jit/jit-rules-interp.c 14
1 files changed, 12 insertions, 2 deletions
diff --git a/jit/jit-rules-interp.c b/jit/jit-rules-interp.c
index 181ebb1..74aaa9f 100644
--- a/jit/jit-rules-interp.c
+++ b/jit/jit-rules-interp.c
@@ -504,7 +504,7 @@ int _jit_create_call_return_insns
return 0;
}
}
- else
+ else if(return_type->kind != JIT_TYPE_VOID)
{
if(!jit_insn_return_reg(func, return_value, 0))
{
@@ -1027,7 +1027,6 @@ void _jit_gen_insn(jit_gencode_t gen, jit_function_t func,
/* Not reached */
case JIT_OP_CALL:
- case JIT_OP_CALL_EXTERNAL:
{
/* Call a function, whose pointer is supplied explicitly */
jit_cache_opcode(&(gen->posn), insn->opcode);
@@ -1035,6 +1034,17 @@ void _jit_gen_insn(jit_gencode_t gen, jit_function_t func,
}
break;
+ case JIT_OP_CALL_EXTERNAL:
+ {
+ /* Call a native function, whose pointer is supplied explicitly */
+ jit_cache_opcode(&(gen->posn), insn->opcode);
+ jit_cache_native(&(gen->posn), (jit_nint)(insn->value2));
+ jit_cache_native(&(gen->posn), (jit_nint)(insn->dest));
+ jit_cache_native(&(gen->posn), (jit_nint)
+ (jit_type_num_params((jit_type_t)(insn->value2))));
+ }
+ break;
+
case JIT_OP_CALL_INDIRECT:
case JIT_OP_CALL_VTABLE_PTR:
{
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月27日 15:04:47 +0000

AltStyle によって変換されたページ (->オリジナル) /