2004-03-01 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Mon, 1 Mar 2004 13:57:05 +0000 (13:57 -0000)
committerZoltan Varga <vargaz@gmail.com>
Mon, 1 Mar 2004 13:57:05 +0000 (13:57 -0000)
* basic-calls.cs basic-float.cs: New regression tests.

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

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

index 9a263b72a3d1dcfa801362af127109daf5669211..03979c9439ff1f590da9d566f8cf0828515dae0d 100644 (file)
@@ -1,5 +1,7 @@
 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
 
+       * basic-calls.cs basic-float.cs: New regression tests.
+
        * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
        negative offsets from %fp. Implement localloc. Fix local register 
        allocation. Fix the case when the this argument needs to be saved to
index 67ef7eb0d5da33c6be5ac5683c966d863efb2fcf..db7354e6607f7b9503eff06b5931c081a98c629e 100644 (file)
@@ -146,18 +146,18 @@ class Tests {
                return pass_floats_doubles (100.0f, 101.0, 102.0, 103.0, 104.0, 105.0f, 106.0);
        }
 
-       static int pass_byref_ints_longs (ref int a, ref long b, ref long c, ref long d, ref long e, ref int f, ref long g) {
+       static int pass_byref_ints_longs (ref int a, ref long b, ref byte c, ref short d, ref long e, ref int f, ref long g) {
                return (int)(a + b + c + d + e + f + g);
        }
 
-       static int pass_takeaddr_ints_longs (int a, long b, long c, long d, long e, int f, long g) {
+       static int pass_takeaddr_ints_longs (int a, long b, byte c, short d, long e, int f, long g) {
                return pass_byref_ints_longs (ref a, ref b, ref c, ref d, ref e, ref f, ref g);
        }
 
        // Test that arguments are moved to the stack from incoming registers
        // when the argument must reside in the stack because its address is taken
-       static int test_1_sparc_takeaddr_argument_passing () {
-               return pass_takeaddr_ints_longs (1, 2, System.Int64.MaxValue, System.Int64.MinValue, System.Int64.MaxValue, 0, System.Int64.MinValue);
+       static int test_2_sparc_takeaddr_argument_passing () {
+               return pass_takeaddr_ints_longs (1, 2, 253, -253, System.Int64.MaxValue, 0, System.Int64.MinValue);
        }
 
        static void shift_un_arg (ulong value) {
index 982feee2ebad5be8328131696bc34ec82735be05..ae1c308db717c5b79ae386068336bc43f26cebc2 100644 (file)
@@ -50,11 +50,23 @@ class Tests {
                return 0;
        }
 
-       static int test_0_conv_i4 () {
+       static int test_0_conv_i () {
                double a = 2.0;
-               int b = (int)a;
-               if (b != 2)
+               int i = (int)a;
+               if (i != 2)
                        return 1;
+               uint ui = (uint)a;
+               if (ui != 2)
+                       return 2;
+               short s = (short)a;
+               if (s != 2)
+                       return 3;
+               ushort us = (ushort)a;
+               if (us != 2)
+                       return 4;
+               byte b = (byte)a;
+               if (b != 2)
+                       return 5;
                return 0;
        }