MIPS: Take operand size into account when inverting stack offsets
[mono.git] / mono / mini / gc-test.cs
index 13f0813cd687e191bed815f381e4579d6afcfefc..b71b0185d9b1f68ecf5011c953c5aa25f432c158 100644 (file)
@@ -1,6 +1,7 @@
 using System;
 using System.Reflection;
 using System.Runtime.CompilerServices;
+using System.Collections;
 
 /*
  * Regression tests for the GC support in the JIT
@@ -538,4 +539,29 @@ class Tests {
                clobber_regs_and_gc ();
                return bi1;
        }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void liveness_12_inner (int a, int b, int c, int d, int e, int f, object o) {
+               GC.Collect (1);
+               o.GetHashCode ();
+       }
+
+       // Liveness for param area
+       public static int test_0_liveness_12 () {
+               // The ref argument should be passed on the stack
+               liveness_12_inner (1, 2, 3, 4, 5, 6, new object ());
+               return 0;
+       }
+
+       public static void liveness_13_inner (ref ArrayList arr) {
+               // The value of arr will be stored in a spill slot
+               arr.Add (alloc_obj_and_gc ());
+       }
+
+       // Liveness for byref arguments in spill slots
+       public static int test_0_liveness_13 () {
+               var arr = new ArrayList ();
+               liveness_13_inner (ref arr);
+               return 0;
+       }
 }
\ No newline at end of file