Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / mini / basic-calls.cs
index 7de5086077e972911b842c6813fadc57324fd497..276f4b9cd8c65133bbeb5e92e46806685292fd9b 100644 (file)
@@ -232,22 +232,6 @@ class Tests {
                return isnan (f) ? 1 : 0;
        }
 
-       struct FooStruct {
-
-               public FooStruct (long l) {
-               }
-       }
-
-       static int test_0_calls_opcode_emulation () {
-               // Test that emulated opcodes do not clobber arguments already in
-               // out registers
-               checked {
-                       long val = 10000;
-                       new FooStruct (val * 10000);
-               }
-               return 0;
-       }
-
        static int first_is_zero (int v1, int v2) {
                if (v1 != 0)
                        return -1;
@@ -260,5 +244,38 @@ class Tests {
                        return 2;
                return 1;
        }
+
+       static long return_5low () {
+               return 5;
+       }
+       
+       static long return_5high () {
+               return 0x500000000;
+       }
+
+       public static int test_3_long_ret () {
+               long val = return_5low ();
+               return (int) (val - 2);
+       }
+
+       public static int test_1_long_ret2 () {
+               long val = return_5high ();
+               if (val > 0xffffffff)
+                       return 1;
+               return 0;
+       }
+
+       static void doit (double value, out long m) {
+               m = (long) value;
+       }
+
+       public static int test_0_ftol_clobber () {
+               long m;
+               doit (1.3, out m);
+               if (m != 1)
+                       return 2;
+               return 0;
+       }
+
 }