Add support for outgoing parameter areas, which should reduce - libjit.git - libjit

index : libjit.git
libjit
summary refs log tree commit diff
path: root/jitplus/jit-plus-function.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rweather@southern-storm.com.au>2004年06月10日 02:05:56 +0000
committerRhys Weatherley <rweather@southern-storm.com.au>2004年06月10日 02:05:56 +0000
commit8fd3a119dc9cc93848c66348817b215b8e236724 (patch)
treed3829846afd3f49490feeee1813f5293b885861b /jitplus/jit-plus-function.cpp
parentac58f0a8ae756dd166ea1f782fb2d0d0bda1d493 (diff)
downloadlibjit-8fd3a119dc9cc93848c66348817b215b8e236724.tar.gz
Add support for outgoing parameter areas, which should reduce
the overhead of function calls that involve stacked arguments on non-x86 platforms; use parameter areas in the ARM back end.
Diffstat (limited to 'jitplus/jit-plus-function.cpp')
-rw-r--r--jitplus/jit-plus-function.cpp 19
1 files changed, 19 insertions, 0 deletions
diff --git a/jitplus/jit-plus-function.cpp b/jitplus/jit-plus-function.cpp
index 1bb8917..38b9a86 100644
--- a/jitplus/jit-plus-function.cpp
+++ b/jitplus/jit-plus-function.cpp
@@ -645,6 +645,8 @@ jit_value jit_function::get_struct_pointer()
* @deftypemethodx jit_function jit_value insn_import (jit_value value)
* @deftypemethodx jit_function void insn_push ({const jit_value&} value)
* @deftypemethodx jit_function void insn_push_ptr ({const jit_value&} value, jit_type_t type)
+ * @deftypemethodx jit_function void insn_set_param ({const jit_value&} value, jit_nint offset)
+ * @deftypemethodx jit_function void insn_set_param_ptr ({const jit_value&} value, jit_type_t type, jit_nint offset)
* @deftypemethodx jit_function void insn_return ({const jit_value&} value)
* @deftypemethodx jit_function void insn_return ()
* @deftypemethodx jit_function void insn_return_ptr ({const jit_value&} value, jit_type_t type)
@@ -1213,6 +1215,23 @@ void jit_function::insn_push_ptr(const jit_value& value, jit_type_t type)
}
}
+void jit_function::insn_set_param(const jit_value& value, jit_nint offset)
+{
+ if(!jit_insn_set_param(func, value.raw(), offset))
+ {
+ out_of_memory();
+ }
+}
+
+void jit_function::insn_set_param_ptr
+ (const jit_value& value, jit_type_t type, jit_nint offset)
+{
+ if(!jit_insn_set_param_ptr(func, value.raw(), type, offset))
+ {
+ out_of_memory();
+ }
+}
+
void jit_function::insn_return(const jit_value& value)
{
if(!jit_insn_return(func, value.raw()))
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月12日 22:57:35 +0000

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