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 engine, compilers and to


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 47e48d8670f47a6504dc5f149eb0fd99f9f9ae4e
Date: Wed, 28 Oct 2009 13:38:12 +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 engine, compilers and tools (pnet)".

The branch, master has been updated
       via  47e48d8670f47a6504dc5f149eb0fd99f9f9ae4e (commit)
      from  2e695f03776691ec000e65f21091d8e3fe68d62d (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/pnet.git/commit/?id=47e48d8670f47a6504dc5f149eb0fd99f9f9ae4e

commit 47e48d8670f47a6504dc5f149eb0fd99f9f9ae4e
Author: Klaus Treichel <address@hidden>
Date:   Wed Oct 28 14:37:55 2009 +0100

    Change jit coder for the extended interlocked functions.

diff --git a/ChangeLog b/ChangeLog
index ec3f023..2419287 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,8 +17,19 @@
 
        * engine/thread.c: likewise
 
+       * engine/jitc.c: likewise
+
        * engine/lib_thread.c: Use the new interlocked functions where possible.
 
+       * engine/jitc_profile.c (_ILJitInterlockedIncrement): Add wrapper
+       function for ILInterlockedIncrementI4.
+       (_ILJitProfileIncreaseMethodCallCount): Call the new wrapper function
+       now instead of ILInterlockedIncrementI4 because this might be a macro.
+
+       * engine/jitc_locals.c (_ILJitLocalsInit): Move the initialization 
blocks
+       to the start of the function only if startlabel and endlabel belong to
+       different blocks (non empty init block).
+ 
 2009-10-11  Klaus Treichel  <address@hidden>
 
        * support/Makefile.am: add interlocked_arm.h and interlocked_ppc.h to
diff --git a/engine/jitc.c b/engine/jitc.c
index 53e5509..d23c96b 100755
--- a/engine/jitc.c
+++ b/engine/jitc.c
@@ -1646,8 +1646,8 @@ void ILRuntimeHandleManagedSafePointFlags(ILExecThread 
*thread)
        }
        else if(thread->managedSafePointFlags & 
_IL_MANAGED_SAFEPOINT_THREAD_SUSPEND)
        {
-               ILInterlockedAnd(&(thread->managedSafePointFlags),
-                                                
~_IL_MANAGED_SAFEPOINT_THREAD_SUSPEND);
+               ILInterlockedAndU4(&(thread->managedSafePointFlags),
+                                                  
~_IL_MANAGED_SAFEPOINT_THREAD_SUSPEND);
                if(ILThreadGetState(thread->supportThread) & 
IL_TS_SUSPEND_REQUESTED)
                {
                        _ILExecThreadSuspendThread(thread, 
thread->supportThread);
diff --git a/engine/jitc_locals.c b/engine/jitc_locals.c
index 85962a7..adf344b 100755
--- a/engine/jitc_locals.c
+++ b/engine/jitc_locals.c
@@ -475,10 +475,18 @@ static int _ILJitLocalsInit(ILJITCoder *coder)
                {
                        return 0;
                }
-               if(!jit_insn_move_blocks_to_start(coder->jitFunction, 
startLabel,
-                                                                               
                                          endLabel))
+               /*
+                * TODO: This additional check for inequal blocks can be removed
+                * later when label merging is fixed in libjit.
+                */
+               if(jit_block_from_label(coder->jitFunction, startLabel) !=
+                  jit_block_from_label(coder->jitFunction, endLabel))
                {
-                       return 0;
+                       if(!jit_insn_move_blocks_to_start(coder->jitFunction, 
startLabel,
+                                                                               
                                                  endLabel))
+                       {
+                               return 0;
+                       }
                }
        }
        return 1;
@@ -610,7 +618,7 @@ static int _ILJitParamsCreate(ILJITCoder *coder)
 {
        ILJitType signature = jit_function_get_signature(coder->jitFunction);
 #ifdef IL_DEBUGGER
-       int markThis;
+       int markThis = 0;
 #endif
 
        if(signature)
diff --git a/engine/jitc_profile.c b/engine/jitc_profile.c
index 96e6893..90bab5e 100755
--- a/engine/jitc_profile.c
+++ b/engine/jitc_profile.c
@@ -65,6 +65,14 @@ static void _ILJitProfileEnd(ILJITCoder *jitCoder, ILMethod 
*method);
 #if !defined(IL_CONFIG_REDUCE_CODE) && !defined(IL_WITHOUT_TOOLS)
 #ifndef ENHANCED_PROFILER
 /*
+ * Helper function for atomic increment of a 32 bit signed integer.
+ */
+static ILInt32 _ILJitInterlockedIncrement(volatile ILInt32 *dest)
+{
+       return ILInterlockedIncrementI4(dest);
+}
+
+/*
  * Emit the code to increase the call count of a method.
  */
 static void _ILJitProfileIncreaseMethodCallCount(ILJITCoder *jitCoder, 
ILMethod *method)
@@ -74,8 +82,8 @@ static void _ILJitProfileIncreaseMethodCallCount(ILJITCoder 
*jitCoder, ILMethod
                                                                                
                                        (jit_nint)(&(method->count)));
 
        jit_insn_call_native(jitCoder->jitFunction,
-                                                "ILInterlockedIncrement",
-                                                ILInterlockedIncrement,
+                                                "_ILJitInterlockedIncrement",
+                                                _ILJitInterlockedIncrement,
                                                 
_ILJitSignature_ILInterlockedIncrement,
                                                 &callCounter, 1, 
JIT_CALL_NOTHROW);
 }

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

Summary of changes:
 ChangeLog             |   11 +++++++++++
 engine/jitc.c         |    4 ++--
 engine/jitc_locals.c  |   16 ++++++++++++----
 engine/jitc_profile.c |   12 ++++++++++--
 4 files changed, 35 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
DotGNU Portable.NET engine, compilers and tools (pnet)




reply via email to

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