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

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

[dotgnu-pnet-commits] pnet ./ChangeLog engine/jitc_branch.c engine/ji...


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnet ./ChangeLog engine/jitc_branch.c engine/ji...
Date: Sat, 31 Dec 2005 09:16:04 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnet
Branch:         
Changes by:     Klaus Treichel <address@hidden> 05/12/31 09:16:04

Modified files:
        .              : ChangeLog 
        engine         : jitc_branch.c jitc_call.c 

Log message:
        Fix compare statements in jitc_branch.c and add return instruchtion in 
jitc_call.c

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnet/ChangeLog.diff?tr1=1.3262&tr2=1.3263&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnet/engine/jitc_branch.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnet/engine/jitc_call.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: pnet/ChangeLog
diff -u pnet/ChangeLog:1.3262 pnet/ChangeLog:1.3263
--- pnet/ChangeLog:1.3262       Fri Dec 30 20:06:58 2005
+++ pnet/ChangeLog      Sat Dec 31 09:16:04 2005
@@ -1,3 +1,10 @@
+2005-12-31  Klaus Treichel  <address@hidden>
+
+       * engine/jitc_branch.c: switch value1 and value2 in the jit_insn_ 
compare
+       statements to get the correct results.
+
+       * engine/jitc_call.c: Add the return statement. (thanks Kirill.)
+
 2005-12-30  Kirill Kononenko  <address@hidden>
 
        * engine/jitc_var.c: Start with load/store params and locals.
Index: pnet/engine/jitc_branch.c
diff -u pnet/engine/jitc_branch.c:1.2 pnet/engine/jitc_branch.c:1.3
--- pnet/engine/jitc_branch.c:1.2       Fri Dec 30 17:42:19 2005
+++ pnet/engine/jitc_branch.c   Sat Dec 31 09:16:04 2005
@@ -227,7 +227,7 @@
                {
                        /* Test two values for equality */
                        AdjustMixedBinary(coder, 0, value1, value2);
-                       return jit_insn_eq(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_eq(coder->jitFunction, *value2, 
*value1);
                }
                break;
 
@@ -235,7 +235,7 @@
                {
                        /* Test two unsigned values for inequality */
                        AdjustMixedBinary(coder, 1, value1, value2);
-                       return jit_insn_ne(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_ne(coder->jitFunction, *value2, 
*value1);
                }
                break;
 
@@ -244,7 +244,7 @@
                {
                        /* Test two signed values for greater than */
                        AdjustMixedBinary(coder, 0, value1, value2);
-                       return jit_insn_gt(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_gt(coder->jitFunction, *value2, 
*value1);
                }
                break;
 
@@ -253,7 +253,7 @@
                {
                        /* Test two unsigned values for greater than */
                        AdjustMixedBinary(coder, 1, value1, value2);
-                       return jit_insn_gt(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_gt(coder->jitFunction, *value2, 
*value1);
                }
                break;
 
@@ -261,7 +261,7 @@
                {
                        /* Test two signed values for greater than  or equal */
                        AdjustMixedBinary(coder, 0, value1, value2);
-                       return jit_insn_ge(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_ge(coder->jitFunction, *value2, 
*value1);
                }
                break;
 
@@ -269,7 +269,7 @@
                {
                        /* Test two unsigned values for greater than  or equal 
*/
                        AdjustMixedBinary(coder, 1, value1, value2);
-                       return jit_insn_ge(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_ge(coder->jitFunction, *value2, 
*value1);
                }
                break;
 
@@ -278,7 +278,7 @@
                {
                        /* Test two signed values for less than */
                        AdjustMixedBinary(coder, 0, value1, value2);
-                       return jit_insn_lt(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_lt(coder->jitFunction, *value2, 
*value1);
                }
                break;
 
@@ -287,7 +287,7 @@
                {
                        /* Test two unsigned values for less than */
                        AdjustMixedBinary(coder, 1, value1, value2);
-                       return jit_insn_lt(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_lt(coder->jitFunction, *value2, 
*value1);
                }
                break;
 
@@ -295,7 +295,7 @@
                {
                        /* Test two signed values for less than or equal */
                        AdjustMixedBinary(coder, 0, value1, value2);
-                       return jit_insn_le(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_le(coder->jitFunction, *value2, 
*value1);
                }
                break;
 
@@ -303,7 +303,7 @@
                {
                        /* Test two unsigned values for less than  or equal */
                        AdjustMixedBinary(coder, 1, value1, value2);
-                       return jit_insn_lt(coder->jitFunction, *value1, 
*value2);
+                       return jit_insn_lt(coder->jitFunction, *value2, 
*value1);
                }
                break;
        }
Index: pnet/engine/jitc_call.c
diff -u pnet/engine/jitc_call.c:1.2 pnet/engine/jitc_call.c:1.3
--- pnet/engine/jitc_call.c:1.2 Tue Dec 27 20:07:24 2005
+++ pnet/engine/jitc_call.c     Sat Dec 31 09:16:04 2005
@@ -170,6 +170,18 @@
 static void JITCoder_ReturnInsn(ILCoder *coder, ILEngineType engineType,
                                                            ILType *returnType)
 {
+       ILJITCoder *jitCoder = _ILCoderToILJITCoder(coder);
+
+       if(engineType == ILEngineType_Invalid)
+       {
+              jit_insn_return(jitCoder->jitFunction, 0);
+       }
+       else
+       {
+               jit_insn_return(jitCoder->jitFunction,
+                                       jitCoder->jitStack[jitCoder->stackTop - 
1]);
+               JITC_ADJUST(jitCoder, -1);
+       }
 }
 
 static void JITCoder_LoadFuncAddr(ILCoder *coder, ILMethod *methodInfo)




reply via email to

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