dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET Just In Time compiler (l


From: Aleksey Demakov
Subject: [dotgnu-pnet-commits] [SCM] DotGNU Portable.NET Just In Time compiler (libjit) branch, master, updated. 865ceafd016266a1f146e4b7f516edcadaffd45a
Date: Fri, 30 Oct 2009 07:47:50 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "DotGNU Portable.NET Just In Time compiler (libjit)".

The branch, master has been updated
       via  865ceafd016266a1f146e4b7f516edcadaffd45a (commit)
      from  b1a26ec0307fb1036a1a0ba4252f617e27b66278 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/libjit.git/commit/?id=865ceafd016266a1f146e4b7f516edcadaffd45a

commit 865ceafd016266a1f146e4b7f516edcadaffd45a
Author: Aleksey Demakov <address@hidden>
Date:   Fri Oct 30 13:47:14 2009 +0600

    clean outgoing registers after calls

diff --git a/ChangeLog b/ChangeLog
index d939080..9f78ab6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-10-30  Aleksey Demakov  <address@hidden>
 
+       * jit/jit-reg-alloc.h, jit/jit-reg-alloc.c
+       (_jit_regs_clear_all_outgoing): add function.
+       * jit/jit-compile.c (compile_block): use _jit_regs_clear_all_outgoing
+       after each function call.
+
        * include/jit/jit-except.h (JIT_RESULT_CACHE_FULL): add result code.
        * jit/jit-cache.h, jit/jit-cache.c (_jit_cache_check_space): add
        function to check the available cache space.
diff --git a/jit/jit-compile.c b/jit/jit-compile.c
index 75dab3f..59bcca6 100644
--- a/jit/jit-compile.c
+++ b/jit/jit-compile.c
@@ -189,6 +189,7 @@ compile_block(jit_gencode_t gen, jit_function_t func, 
jit_block_t block)
                        }
                        break;
 
+#ifndef JIT_BACKEND_INTERP
                case JIT_OP_CALL:
                case JIT_OP_CALL_TAIL:
                case JIT_OP_CALL_INDIRECT:
@@ -199,8 +200,12 @@ compile_block(jit_gencode_t gen, jit_function_t func, 
jit_block_t block)
                case JIT_OP_CALL_EXTERNAL_TAIL:
                        /* Spill all caller-saved registers before a call */
                        _jit_regs_spill_all(gen);
+                       /* Generate code for the instruction with the back end 
*/
                        _jit_gen_insn(gen, func, block, insn);
+                       /* Free outgoing registers if any */
+                       _jit_regs_clear_all_outgoing(gen);
                        break;
+#endif
 
 #ifndef JIT_BACKEND_INTERP
                case JIT_OP_INCOMING_REG:
@@ -208,6 +213,7 @@ compile_block(jit_gencode_t gen, jit_function_t func, 
jit_block_t block)
                        _jit_regs_set_incoming(gen,
                                               
(int)jit_value_get_nint_constant(insn->value2),
                                               insn->value1);
+                       /* Generate code for the instruction with the back end 
*/
                        _jit_gen_insn(gen, func, block, insn);
                        break;
 #endif
@@ -253,6 +259,7 @@ compile_block(jit_gencode_t gen, jit_function_t func, 
jit_block_t block)
                        _jit_regs_set_incoming(gen,
                                               
(int)jit_value_get_nint_constant(insn->value2),
                                               insn->value1);
+                       /* Generate code for the instruction with the back end 
*/
                        _jit_gen_insn(gen, func, block, insn);
                        break;
 #endif
diff --git a/jit/jit-reg-alloc.c b/jit/jit-reg-alloc.c
index 3dad531..21798c6 100644
--- a/jit/jit-reg-alloc.c
+++ b/jit/jit-reg-alloc.c
@@ -2760,7 +2760,8 @@ void _jit_regs_alloc_global(jit_gencode_t gen, 
jit_function_t func)
  * Initialize the register allocation state for a new block.
  * @end deftypefun
 @*/
-void _jit_regs_init_for_block(jit_gencode_t gen)
+void
+_jit_regs_init_for_block(jit_gencode_t gen)
 {
        int reg;
        gen->current_age = 1;
@@ -2940,6 +2941,18 @@ _jit_regs_set_outgoing(jit_gencode_t gen, int reg, 
jit_value_t value)
        }
 }
 
+/*@
+ * @deftypefun void _jit_regs_clear_all_outgoing (jit_gencode_t gen)
+ * Free registers used fot outgoing parameters.  This is used to
+ * clean up after a function call.
+ * @end deftypefun
address@hidden/
+void
+_jit_regs_clear_all_outgoing(jit_gencode_t gen)
+{
+       gen->inhibit = jit_regused_init;
+}
+
 /* TODO: remove this function */
 /*@
  * @deftypefun void _jit_regs_force_out (jit_gencode_t gen, jit_value_t value, 
int is_dest)
diff --git a/jit/jit-reg-alloc.h b/jit/jit-reg-alloc.h
index 32adb6f..6368fe7 100644
--- a/jit/jit-reg-alloc.h
+++ b/jit/jit-reg-alloc.h
@@ -146,6 +146,7 @@ void _jit_regs_init_for_block(jit_gencode_t gen);
 void _jit_regs_spill_all(jit_gencode_t gen);
 void _jit_regs_set_incoming(jit_gencode_t gen, int reg, jit_value_t value);
 void _jit_regs_set_outgoing(jit_gencode_t gen, int reg, jit_value_t value);
+void _jit_regs_clear_all_outgoing(jit_gencode_t gen);
 void _jit_regs_force_out(jit_gencode_t gen, jit_value_t value, int is_dest);
 int _jit_regs_load_value(jit_gencode_t gen, jit_value_t value, int destroy, 
int used_again);
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |    5 +++++
 jit/jit-compile.c   |    7 +++++++
 jit/jit-reg-alloc.c |   15 ++++++++++++++-
 jit/jit-reg-alloc.h |    1 +
 4 files changed, 27 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
DotGNU Portable.NET Just In Time compiler (libjit)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]