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

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

[dotgnu-pnet-commits] libjit ChangeLog include/jit/jit-function.h jit...


From: Aleksey Demakov
Subject: [dotgnu-pnet-commits] libjit ChangeLog include/jit/jit-function.h jit...
Date: Sun, 07 Oct 2007 14:16:51 +0000

CVSROOT:        /sources/dotgnu-pnet
Module name:    libjit
Changes by:     Aleksey Demakov <avd>   07/10/07 14:16:51

Modified files:
        .              : ChangeLog 
        include/jit    : jit-function.h 
        jit            : jit-function.c 

Log message:
        add jit_function_reserve_label function

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libjit/ChangeLog?cvsroot=dotgnu-pnet&r1=1.319&r2=1.320
http://cvs.savannah.gnu.org/viewcvs/libjit/include/jit/jit-function.h?cvsroot=dotgnu-pnet&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/libjit/jit/jit-function.c?cvsroot=dotgnu-pnet&r1=1.30&r2=1.31

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/ChangeLog,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -b -r1.319 -r1.320
--- ChangeLog   7 Oct 2007 14:01:02 -0000       1.319
+++ ChangeLog   7 Oct 2007 14:16:50 -0000       1.320
@@ -3,6 +3,10 @@
        * jit/jit-rules-x86.ins (JIT_OP_JUMP_TABLE): fix jump table code
        generation.
 
+       * include/jit/jit-function.h: 
+       * jit/jit-function.c (jit_function_reserve_label): add new function
+       to create labels for jump tables.
+
 2007-06-11  Aleksey Demakov  <address@hidden>
 
        * jit/jit-insn.c (accumulate_relative_offset): remove.

Index: include/jit/jit-function.h
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/include/jit/jit-function.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- include/jit/jit-function.h  4 Feb 2007 14:31:32 -0000       1.5
+++ include/jit/jit-function.h  7 Oct 2007 14:16:50 -0000       1.6
@@ -75,6 +75,7 @@
 unsigned int jit_function_get_optimization_level
        (jit_function_t func) JIT_NOTHROW;
 unsigned int jit_function_get_max_optimization_level(void) JIT_NOTHROW;
+jit_label_t jit_function_reserve_label(jit_function_t func) JIT_NOTHROW;
 
 #ifdef __cplusplus
 };

Index: jit/jit-function.c
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/jit/jit-function.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- jit/jit-function.c  15 Feb 2007 07:31:05 -0000      1.30
+++ jit/jit-function.c  7 Oct 2007 14:16:50 -0000       1.31
@@ -1635,3 +1635,23 @@
        /* TODO - implement more than basic optimization */
        return 0;
 }
+
+/*@
+ * @deftypefun {jit_label_t} jit_function_reserve_label (jit_function_t func)
+ * Allocate a new label for later use within the function @code{func}. Most
+ * instructions that require a label could perform label allocation themselves.
+ * A separate label allocation could be useful to fill a jump table with
+ * identical entries.
+ * @end deftypefun
address@hidden/
+jit_label_t
+jit_function_reserve_label(jit_function_t func)
+{
+       /* Ensure that we have a function builder */
+       if(!_jit_function_ensure_builder(func))
+       {
+               return jit_label_undefined;
+       }
+
+       return (func->builder->next_label)++;
+}




reply via email to

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