2009-09-08 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Tue, 8 Sep 2009 14:24:54 +0000 (14:24 -0000)
committerZoltan Varga <vargaz@gmail.com>
Tue, 8 Sep 2009 14:24:54 +0000 (14:24 -0000)
* basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
test which depends on structs to objects.cs.

svn path=/trunk/mono/; revision=141524

mono/mini/ChangeLog
mono/mini/basic-calls.cs
mono/mini/objects.cs

index e9cd77a63d698ff74cf12c30c9faf51401e926c5..48522673d46ea0b2be01b5f01cb9d09875a875da 100644 (file)
@@ -1,5 +1,8 @@
 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
 
+       * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
+       test which depends on structs to objects.cs.
+       
        * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
        require object model related stuff working.
 
index 01be6a523f803d26b1fa238fb2f9625fb58964bc..2fd603db91060e93be0b14a65d7ba95bf3544c07 100644 (file)
@@ -23,18 +23,6 @@ using System.Reflection;
  * the IL code looks.
  */
 
-struct Alpha {
-       public long a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
-}
-
-struct Beta {
-       public Alpha a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
-}
-
-struct Gamma {
-       public Beta a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
-}
-
 class Tests {
 
        static int Main () {
@@ -299,46 +287,5 @@ class Tests {
                        return 2;
                return 0;
        }
-
-       static void InitMe (out Gamma noMercyWithTheStack) {
-               noMercyWithTheStack = new Gamma ();
-       }
-
-       static int FunNoInline () {
-               int x = 99;
-               if (x > 344 && x < 22)
-                       return 333;
-               return x;
-       }
-
-       static float DoNothingButDontInline (float a, int b) {
-               if (b > 0)
-                       return a;
-               else if (b < 0 && b > 10)
-                       return 444.0f;
-               return a;
-       }
-
-       /*
-        * The local register allocator emits loadr8_membase and storer8_membase
-        * to do spilling. This code is generated after mono_arch_lowering_pass so
-        * mono_arch_output_basic_block must know how to deal with big offsets.
-        * This only happens because the call in middle forces the temp for "(float)obj"
-        * to be spilled.
-       */
-       public static int test_0_float_load_and_store_with_big_offset ()
-       {
-               object obj = 1.0f;
-               Gamma noMercyWithTheStack;
-               float res;
-
-               InitMe (out noMercyWithTheStack);
-
-               res = DoNothingButDontInline ((float)obj, FunNoInline ());
-
-               if (!(res == 1.0f))
-                       return 1;
-               return 0;
-       }
 }
 
index e84457998586754d91b9e9ae2a3b19ba24686291..424f5502653b7a51aac09c256c585ebc2b9a49b6 100644 (file)
@@ -100,6 +100,18 @@ enum SampleEnum {
        C
 }
 
+struct Alpha {
+       public long a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
+}
+
+struct Beta {
+       public Alpha a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
+}
+
+struct Gamma {
+       public Beta a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
+}
+
 class Tests {
 
        static int Main () {
@@ -1380,5 +1392,46 @@ ncells ) {
                
                return array [1].val;
        }
+
+       static void InitMe (out Gamma noMercyWithTheStack) {
+               noMercyWithTheStack = new Gamma ();
+       }
+
+       static int FunNoInline () {
+               int x = 99;
+               if (x > 344 && x < 22)
+                       return 333;
+               return x;
+       }
+
+       static float DoNothingButDontInline (float a, int b) {
+               if (b > 0)
+                       return a;
+               else if (b < 0 && b > 10)
+                       return 444.0f;
+               return a;
+       }
+
+       /*
+        * The local register allocator emits loadr8_membase and storer8_membase
+        * to do spilling. This code is generated after mono_arch_lowering_pass so
+        * mono_arch_output_basic_block must know how to deal with big offsets.
+        * This only happens because the call in middle forces the temp for "(float)obj"
+        * to be spilled.
+       */
+       public static int test_0_float_load_and_store_with_big_offset ()
+       {
+               object obj = 1.0f;
+               Gamma noMercyWithTheStack;
+               float res;
+
+               InitMe (out noMercyWithTheStack);
+
+               res = DoNothingButDontInline ((float)obj, FunNoInline ());
+
+               if (!(res == 1.0f))
+                       return 1;
+               return 0;
+       }
 }