Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / mini / basic-calls.cs
index bc3a617e181a09d58ec189dd14a64492dcf8b157..ad3cdde59a1f3284f151948cf5441b6910db2fd8 100644 (file)
@@ -23,14 +23,14 @@ using System.Reflection;
  * the IL code looks.
  */
 
-#if MOBILE
+#if __MOBILE__
 class CallsTests
 #else
 class Tests
 #endif
 {
 
-#if !MOBILE
+#if !__MOBILE__
        public static int Main (string[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
@@ -317,5 +317,29 @@ class Tests
                        return 2;
                return 0;
        }
-}
 
+       public static bool arm64_stack_arg_reg_bool (object o1, object o2, object o3, object o4, object o5, object o6, object o7,
+                                                                                                bool foo, bool bar) {
+               bool res1 = bar || foo;
+               bool res2 = bar || foo;
+               return res1 | res2;
+       }
+
+       public static int arm64_stack_arg_reg_sbyte (object o1, object o2, object o3, object o4, object o5, object o6, object o7,
+                                                                                                sbyte foo, sbyte bar) {
+               int res1 = bar + foo;
+               int res2 = bar + foo;
+               return res1 + res2;
+       }
+
+       // bool argument passed on the stack and promoted to a register
+       public static int test_0_arm64_stack_arg_reg_bool () {
+           bool res = arm64_stack_arg_reg_bool (null, null, null, null, null, null, null, false, false);
+               return res ? 1 : 0;
+       }
+
+       public static int test_0_arm64_stack_arg_reg_sbyte () {
+           int res = arm64_stack_arg_reg_sbyte (null, null, null, null, null, null, null, -4, -7);
+               return res == -22 ? 0 : 1;
+       }
+}