Add two additional HVA tests:
authorBrian Sullivan <briansul@microsoft.com>
Wed, 1 May 2019 20:51:32 +0000 (13:51 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Wed, 1 May 2019 20:51:32 +0000 (13:51 -0700)
VectorMgdMgdStatic.cs  - Tests where we are passing and using a HVA that is stored in a static
VectorMgdMgdArray.cs   - Tests where we are passing and using a HVA that is stored in an array

Commit migrated from https://github.com/dotnet/coreclr/commit/51290ffc2a45a11ffd45d738d4ff7134a7165f74

src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdArray.cs [new file with mode: 0644]
src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdArray_r.csproj [new file with mode: 0644]
src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdArray_ro.csproj [new file with mode: 0644]
src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdStatic.cs [new file with mode: 0644]
src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdStatic_r.csproj [new file with mode: 0644]
src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdStatic_ro.csproj [new file with mode: 0644]

diff --git a/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdArray.cs b/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdArray.cs
new file mode 100644 (file)
index 0000000..5bbd528
--- /dev/null
@@ -0,0 +1,1099 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Runtime.Intrinsics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Test passing and returning HVAs (homogeneous vector aggregates) to/from managed code.
+// Test various sizes (including ones that exceed the limit for being treated as HVAs),
+// as well as passing various numbers of them (so that we exceed the available registers),
+// and mixing the HVA parameters with non-HVA parameters.
+
+// This Test case covers all cases for
+//   Methods that take one HVA argument with between 1 and 9 Vectror64 or Vector128 elements
+//   - Called normally or by using reflection
+//   Methods that return an HVA with between 1 and 9 Vectror64 or Vector128 elements
+//   - Called normally or by using reflection
+
+// Remaining Test cases to do:
+// - Add tests that have one than one HVA argument
+// - Add types that are *not* HVA types (e.g. too many vectors, or using Vector256).
+// - Add tests that use a mix of HVA and non-HVA arguments
+
+public static class VectorMgdMgd
+{
+    private const int PASS = 100;
+    private const int FAIL = 0;
+
+    static Random random = new Random(12345);
+
+    public static T GetValueFromInt<T>(int value)
+    {
+        if (typeof(T) == typeof(float))
+        {
+            float floatValue = (float)value;
+            return (T)(object)floatValue;
+        }
+        if (typeof(T) == typeof(double))
+        {
+            double doubleValue = (double)value;
+            return (T)(object)doubleValue;
+        }
+        if (typeof(T) == typeof(int))
+        {
+            return (T)(object)value;
+        }
+        if (typeof(T) == typeof(uint))
+        {
+            uint uintValue = (uint)value;
+            return (T)(object)uintValue;
+        }
+        if (typeof(T) == typeof(long))
+        {
+            long longValue = (long)value;
+            return (T)(object)longValue;
+        }
+        if (typeof(T) == typeof(ulong))
+        {
+            ulong longValue = (ulong)value;
+            return (T)(object)longValue;
+        }
+        if (typeof(T) == typeof(ushort))
+        {
+            return (T)(object)(ushort)value;
+        }
+        if (typeof(T) == typeof(byte))
+        {
+            return (T)(object)(byte)value;
+        }
+        if (typeof(T) == typeof(short))
+        {
+            return (T)(object)(short)value;
+        }
+        if (typeof(T) == typeof(sbyte))
+        {
+            return (T)(object)(sbyte)value;
+        }
+        else
+        {
+            throw new ArgumentException();
+        }
+    }
+    public static bool CheckValue<T>(T value, T expectedValue)
+    {
+        bool returnVal;
+        if (typeof(T) == typeof(float))
+        {
+            returnVal = Math.Abs(((float)(object)value) - ((float)(object)expectedValue)) <= Single.Epsilon;
+        }
+        if (typeof(T) == typeof(double))
+        {
+            returnVal = Math.Abs(((double)(object)value) - ((double)(object)expectedValue)) <= Double.Epsilon;
+        }
+        else
+        {
+            returnVal = value.Equals(expectedValue);
+        }
+        return returnVal;
+    }
+
+    public unsafe class HVATests<T> where T : struct
+    {
+        // An HVA can contain up to 4 vectors, so we'll test structs with up to 5 of them
+        // (to ensure that even those that are too large are handled consistently).
+        // So we need 5 * the element count in the largest (128-bit) vector with the smallest
+        // element type (byte).
+        static T[] values;
+        static T[] check;
+        private int ElementCount = (Unsafe.SizeOf<Vector128<T>>() / sizeof(byte)) * 5;
+        public bool isPassing = true;
+        public bool isReflection = false;
+
+        Type[] reflectionParameterTypes;
+        System.Reflection.MethodInfo reflectionMethodInfo;
+        object[] reflectionInvokeArgs;
+
+        ////////////////////////////////////////
+
+        public struct HVA64_01
+        {
+            public Vector64<T> v0;
+        }
+
+        public struct HVA64_02
+        {
+            public Vector64<T> v0;
+            public Vector64<T> v1;
+        }
+
+        public struct HVA64_03
+        {
+            public Vector64<T> v0;
+            public Vector64<T> v1;
+            public Vector64<T> v2;
+        }
+
+        public struct HVA64_04
+        {
+            public Vector64<T> v0;
+            public Vector64<T> v1;
+            public Vector64<T> v2;
+            public Vector64<T> v3;
+        }
+
+        public struct HVA64_05
+        {
+            public Vector64<T> v0;
+            public Vector64<T> v1;
+            public Vector64<T> v2;
+            public Vector64<T> v3;
+            public Vector64<T> v4;
+        }
+
+        private HVA64_01[]  hva64_01_a;
+        private HVA64_02[]  hva64_02_a;
+        private HVA64_03[]  hva64_03_a;
+        private HVA64_04[]  hva64_04_a;
+        private HVA64_05[]  hva64_05_a;
+
+        ////////////////////////////////////////
+
+        public struct HVA128_01
+        {
+            public Vector128<T> v0;
+        }
+
+        public struct HVA128_02
+        {
+            public Vector128<T> v0;
+            public Vector128<T> v1;
+        }
+
+        public struct HVA128_03
+        {
+            public Vector128<T> v0;
+            public Vector128<T> v1;
+            public Vector128<T> v2;
+        }
+
+        public struct HVA128_04
+        {
+            public Vector128<T> v0;
+            public Vector128<T> v1;
+            public Vector128<T> v2;
+            public Vector128<T> v3;
+        }
+
+        public struct HVA128_05
+        {
+            public Vector128<T> v0;
+            public Vector128<T> v1;
+            public Vector128<T> v2;
+            public Vector128<T> v3;
+            public Vector128<T> v4;
+       }
+
+        private HVA128_01[] hva128_01_a;
+        private HVA128_02[] hva128_02_a;
+        private HVA128_03[] hva128_03_a;
+        private HVA128_04[] hva128_04_a;
+        private HVA128_05[] hva128_05_a;
+
+        ////////////////////////////////////////
+
+        public void Init_HVAs()
+        {
+            int i;
+
+            i = 0;
+           hva64_01_a = new HVA64_01[5];
+            hva64_01_a[4].v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            i = 0;
+           hva64_02_a = new HVA64_02[4];
+            hva64_02_a[3].v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_02_a[3].v1 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            i = 0;
+           hva64_03_a = new HVA64_03[3];
+            hva64_03_a[2].v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_03_a[2].v1 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_03_a[2].v2 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            i = 0;
+           hva64_04_a = new HVA64_04[2];
+            hva64_04_a[1].v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_04_a[1].v1 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_04_a[1].v2 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_04_a[1].v3 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            i = 0;
+           hva64_05_a = new HVA64_05[1];
+            hva64_05_a[0].v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_05_a[0].v1 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_05_a[0].v2 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_05_a[0].v3 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_05_a[0].v4 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            ////////////////////////////////////////
+
+            i = 0;
+           hva128_01_a = new HVA128_01[5];
+            hva128_01_a[4].v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+
+            i = 0;
+           hva128_02_a = new HVA128_02[4];
+            hva128_02_a[3].v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_02_a[3].v1 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+
+            i = 0;
+           hva128_03_a = new HVA128_03[3];
+            hva128_03_a[2].v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_03_a[2].v1 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_03_a[2].v2 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+
+            i = 0;
+           hva128_04_a = new HVA128_04[2];
+            hva128_04_a[1].v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_04_a[1].v1 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_04_a[1].v2 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_04_a[1].v3 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i = 0;
+           hva128_05_a = new HVA128_05[1];
+            hva128_05_a[0].v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_05_a[0].v1 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_05_a[0].v2 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_05_a[0].v3 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_05_a[0].v4 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+       }
+
+        public HVATests()
+        {
+            values = new T[ElementCount];
+            for (int i = 0; i < values.Length; i++)
+            {
+                int data = random.Next(100);
+                values[i] = GetValueFromInt<T>(data);
+            }
+
+            Init_HVAs();
+        }
+
+        // Checks that the values in v correspond to those in the values array starting
+        // with values[index]
+        private void checkValues(string msg, Vector64<T> v, int index)
+        {
+            bool printedMsg = false;  // Print at most one message
+
+            for (int i = 0; i < Vector64<T>.Count; i++)
+            {
+                if (!CheckValue<T>(v.GetElement(i), values[index]))
+                {
+                    if (!printedMsg)
+                    {
+                        Console.WriteLine("{0}: FAILED - Vector64<T> checkValues(index = {1}, i = {2}) {3}",
+                                          msg, index, i, isReflection ? "(via reflection)" : "" );
+                        printedMsg = true;
+                    }
+
+                    // Record failure status in global isPassing
+                    isPassing = false;
+                }
+                index++;
+            }
+        }
+
+        // Checks that the values in v correspond to those in the values array starting
+        // with values[index]
+        private void checkValues(string msg, Vector128<T> v, int index)
+        {
+            bool printedMsg = false;  // Print at most one message
+
+            for (int i = 0; i < Vector128<T>.Count; i++)
+            {
+                if (!CheckValue<T>(v.GetElement(i), values[index]))
+                {
+                    if (!printedMsg)
+                    {
+                        Console.WriteLine("{0}: FAILED - Vector64<T> checkValues(index = {1}, i = {2}) {3}",
+                                          msg, index, i, isReflection ? "(via reflection)" : "" );
+                        printedMsg = true;
+                    }
+
+                    // Record failure status in global isPassing
+                    isPassing = false;
+                }
+                index++;
+            }
+        }
+
+        public void Done_Reflection()
+        {
+            isReflection = false;
+        }
+
+        //==========    Vector64<T> tests
+
+        //====================   Tests for passing 1 argumnet of HVA64_01
+
+        // Test the case where we've passed in a single argument HVA of 1 vector.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_01(HVA64_01 arg1)
+        {
+            checkValues("test1Argument_HVA64_01(arg1.vo)", arg1.v0, 0);
+        }
+
+        public void Init_Reflection_Args_HVA64_01()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_01) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_01), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_01_a[4] };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA64_02
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_02(HVA64_02 arg1)
+        {
+            checkValues("test1Argument_HVA64_02(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA64_02(arg1.v1)", arg1.v1, Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA64_02()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_02) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_02), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_02_a[3] };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA64_03
+
+        // Test the case where we've passed in a single argument HVA of 3 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_03(HVA64_03 arg1)
+        {
+            checkValues("test1Argument_HVA64_03(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA64_03(arg1.v1)", arg1.v1, 1 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_03(arg1.v2)", arg1.v2, 2 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA64_03()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_03) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_03), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_03_a[2] };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA64_04
+
+        // Test the case where we've passed in a single argument HVA of 4 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_04(HVA64_04 arg1)
+        {
+            checkValues("test1Argument_HVA64_04(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA64_04(arg1.v1)", arg1.v1, 1 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_04(arg1.v2)", arg1.v2, 2 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_04(arg1.v3)", arg1.v3, 3 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA64_04()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_04) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_04), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_04_a[1] };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA64_05
+
+        // Test the case where we've passed in a single argument HVA of 5 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_05(HVA64_05 arg1)
+        {
+            checkValues("test1Argument_HVA64_05(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA64_05(arg1.v1)", arg1.v1, 1 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_05(arg1.v2)", arg1.v2, 2 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_05(arg1.v3)", arg1.v3, 3 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_05(arg1.v4)", arg1.v4, 4 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA64_05()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_05) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_05), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_05_a[0] };
+        }
+
+        //===============   Tests for return values if HVA64
+
+        //====================   Tests for return values of HVA64_01
+
+        // Return an HVA of 1 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_01 returnTest_HVA64_01()
+        {
+            return hva64_01_a[4];
+        }
+
+        public void testReturn_HVA64_01()
+        {
+            HVA64_01 result = returnTest_HVA64_01();
+            checkValues("testReturn_HVA64_01(result.v0)",result.v0, 0);
+        }
+
+        public void Init_Reflection_Return_HVA64_01()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_01), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_01()
+        {
+            Init_Reflection_Return_HVA64_01();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_01 result = (HVA64_01)objResult;
+
+            checkValues("testReflectionReturn_HVA64_01(result.v0)",result.v0, 0);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA64_02
+
+        // Return an HVA of 2 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_02 returnTest_HVA64_02()
+        {
+            return hva64_02_a[3];
+        }
+
+        public void testReturn_HVA64_02()
+        {
+            HVA64_02 result = returnTest_HVA64_02();
+            checkValues("testReturn_HVA64_02(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA64_02(result.v1)",result.v1, Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA64_02()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_02), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_02()
+        {
+            Init_Reflection_Return_HVA64_02();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_02 result = (HVA64_02)objResult;
+
+            checkValues("testReflectionReturn_HVA64_02(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA64_02(result.v1)",result.v1, Vector64<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA64_03
+
+        // Return an HVA of 3 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_03 returnTest_HVA64_03()
+        {
+            return hva64_03_a[2];
+        }
+
+        public void testReturn_HVA64_03()
+        {
+            HVA64_03 result = returnTest_HVA64_03();
+            checkValues("testReturn_HVA64_03(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA64_03(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_03(result.v2)",result.v2, 2 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA64_03()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_03), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_03()
+        {
+            Init_Reflection_Return_HVA64_03();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_03 result = (HVA64_03)objResult;
+
+            checkValues("testReflectionReturn_HVA64_03(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA64_03(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_03(result.v2)",result.v2, 2 * Vector64<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA64_04
+
+        // Return an HVA of 4 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_04 returnTest_HVA64_04()
+        {
+            return hva64_04_a[1];
+        }
+
+        public void testReturn_HVA64_04()
+        {
+            HVA64_04 result = returnTest_HVA64_04();
+            checkValues("testReturn_HVA64_04(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA64_04(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_04(result.v2)",result.v2, 2 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_04(result.v3)",result.v3, 3 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA64_04()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_04), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_04()
+        {
+            Init_Reflection_Return_HVA64_04();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_04 result = (HVA64_04)objResult;
+
+            checkValues("testReflectionReturn_HVA64_04(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA64_04(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_04(result.v2)",result.v2, 2 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_04(result.v3)",result.v3, 3 * Vector64<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA64_05
+
+        // Return an HVA of 5 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_05 returnTest_HVA64_05()
+        {
+            return hva64_05_a[0];
+        }
+
+        public void testReturn_HVA64_05()
+        {
+            HVA64_05 result = returnTest_HVA64_05();
+            checkValues("testReturn_HVA64_05(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA64_05(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_05(result.v2)",result.v2, 2 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_05(result.v3)",result.v3, 3 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_05(result.v4)",result.v4, 4 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA64_05()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_05), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_05()
+        {
+            Init_Reflection_Return_HVA64_05();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_05 result = (HVA64_05)objResult;
+
+            checkValues("testReflectionReturn_HVA64_05(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA64_05(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_05(result.v2)",result.v2, 2 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_05(result.v3)",result.v3, 3 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_05(result.v4)",result.v4, 4 * Vector64<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //==========    Vector128<T> tests
+
+        //====================   Tests for passing 1 argumnet of HVA128_01
+
+        // Test the case where we've passed in a single argument HVA of 1 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_01(HVA128_01 arg1)
+        {
+            checkValues("test1Argument_HVA128_01(arg1.v0)", arg1.v0, 0);
+        }
+
+        public void Init_Reflection_Args_HVA128_01()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_01) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_01), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_01_a[4] };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA128_02
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_02(HVA128_02 arg1)
+        {
+            checkValues("test1Argument_HVA128_02(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA128_02(arg1.v1)", arg1.v1, Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA128_02()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_02) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_02), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_02_a[3] };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA128_03
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_03(HVA128_03 arg1)
+        {
+            checkValues("test1Argument_HVA128_03(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA128_03(arg1.v1)", arg1.v1, 1 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_03(arg1.v2)", arg1.v2, 2 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA128_03()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_03) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_03), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_03_a[2] };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA128_04
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_04(HVA128_04 arg1)
+        {
+            checkValues("test1Argument_HVA128_04(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA128_04(arg1.v1)", arg1.v1, 1 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_04(arg1.v2)", arg1.v2, 2 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_04(arg1.v3)", arg1.v3, 3 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA128_04()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_04) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_04), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_04_a[1] };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA128_05
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_05(HVA128_05 arg1)
+        {
+            checkValues("test1Argument_HVA128_05(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA128_05(arg1.v1)", arg1.v1, 1 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_05(arg1.v2)", arg1.v2, 2 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_05(arg1.v3)", arg1.v3, 3 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_05(arg1.v4)", arg1.v4, 4 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA128_05()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_05) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_05), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_05_a[0] };
+        }
+
+        //====================   Tests for return values of HVA128_01
+
+        // Return an HVA of 1 vector, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_01 returnTest_HVA128_01()
+        {
+            return hva128_01_a[4];
+        }
+
+        public void testReturn_HVA128_01()
+        {
+            HVA128_01 result = returnTest_HVA128_01();
+            checkValues("testReturn_HVA128_01(result.v0)",result.v0, 0);
+        }
+
+        public void Init_Reflection_Return_HVA128_01()
+        {
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_01), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_01()
+        {
+            Init_Reflection_Return_HVA128_01();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_01 result = (HVA128_01)objResult;
+
+            checkValues("testReflectionReturn_HVA128_01(result.v0)",result.v0, 0);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA128_02
+
+        // Return an HVA of 2 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_02 returnTest_HVA128_02()
+        {
+            return hva128_02_a[3];
+        }
+
+        public void testReturn_HVA128_02()
+        {
+            HVA128_02 result = returnTest_HVA128_02();
+            checkValues("testReturn_HVA128_02(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA128_02(result.v1)",result.v1, Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA128_02()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_02), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_02()
+        {
+            Init_Reflection_Return_HVA128_02();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_02 result = (HVA128_02)objResult;
+
+            checkValues("testReflectionReturn_HVA128_02(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA128_02(result.v1)",result.v1, Vector128<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA128_03
+
+        // Return an HVA of 3 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_03 returnTest_HVA128_03()
+        {
+            return hva128_03_a[2];
+        }
+
+        public void testReturn_HVA128_03()
+        {
+            HVA128_03 result = returnTest_HVA128_03();
+            checkValues("testReturn_HVA128_03(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA128_03(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_03(result.v2)",result.v2, 2 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA128_03()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_03), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_03()
+        {
+            Init_Reflection_Return_HVA128_03();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_03 result = (HVA128_03)objResult;
+
+            checkValues("testReflectionReturn_HVA128_03(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA128_03(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_03(result.v2)",result.v2, 2 * Vector128<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA128_04
+
+        // Return an HVA of 3 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_04 returnTest_HVA128_04()
+        {
+            return hva128_04_a[1];
+        }
+
+        public void testReturn_HVA128_04()
+        {
+            HVA128_04 result = returnTest_HVA128_04();
+            checkValues("testReturn_HVA128_04(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA128_04(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_04(result.v2)",result.v2, 2 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_04(result.v3)",result.v3, 3 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA128_04()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_04), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_04()
+        {
+            Init_Reflection_Return_HVA128_04();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_04 result = (HVA128_04)objResult;
+
+            checkValues("testReflectionReturn_HVA128_04(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA128_04(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_04(result.v2)",result.v2, 2 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_04(result.v3)",result.v3, 3 * Vector128<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA128_05
+
+        // Return an HVA of 3 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_05 returnTest_HVA128_05()
+        {
+            return hva128_05_a[0];
+        }
+
+        public void testReturn_HVA128_05()
+        {
+            HVA128_05 result = returnTest_HVA128_05();
+            checkValues("testReturn_HVA128_05(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA128_05(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_05(result.v2)",result.v2, 2 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_05(result.v3)",result.v3, 3 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_05(result.v4)",result.v4, 4 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA128_05()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_05), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_05()
+        {
+            Init_Reflection_Return_HVA128_05();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_05 result = (HVA128_05)objResult;
+
+            checkValues("testReflectionReturn_HVA128_05(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA128_05(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_05(result.v2)",result.v2, 2 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_05(result.v3)",result.v3, 3 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_05(result.v4)",result.v4, 4 * Vector128<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //////////////////////////////////////////////////
+
+        public void doTests()
+        {
+            //////  Vector64<T> tests
+
+            // Test HVA Vector64<T> Arguments
+
+            test1Argument_HVA64_01(hva64_01_a[4]);
+
+            Init_Reflection_Args_HVA64_01();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA64_02(hva64_02_a[3]);
+
+            Init_Reflection_Args_HVA64_02();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA64_03(hva64_03_a[2]);
+
+            Init_Reflection_Args_HVA64_03();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA64_04(hva64_04_a[1]);
+
+            Init_Reflection_Args_HVA64_04();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA64_05(hva64_05_a[0]);
+
+            Init_Reflection_Args_HVA64_05();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            // Test HVA Vector64<T> Return values
+
+            testReturn_HVA64_01();
+
+            testReflectionReturn_HVA64_01();
+
+
+            testReturn_HVA64_02();
+
+            testReflectionReturn_HVA64_02();
+
+
+            testReturn_HVA64_03();
+
+            testReflectionReturn_HVA64_03();
+
+
+            testReturn_HVA64_04();
+
+            testReflectionReturn_HVA64_04();
+
+
+            testReturn_HVA64_05();
+
+            testReflectionReturn_HVA64_05();
+
+
+            //////  Vector128<T> tests
+
+            // Test HVA Vector128<T> Arguments
+
+            test1Argument_HVA128_01(hva128_01_a[4]);
+
+            Init_Reflection_Args_HVA128_01();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA128_02(hva128_02_a[3]);
+
+            Init_Reflection_Args_HVA128_02();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA128_03(hva128_03_a[2]);
+
+            Init_Reflection_Args_HVA128_03();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA128_04(hva128_04_a[1]);
+
+            Init_Reflection_Args_HVA128_04();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA128_05(hva128_05_a[0]);
+
+            Init_Reflection_Args_HVA128_05();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            // Test HVA Vector128<T> Return values
+
+            testReturn_HVA128_01();
+            testReflectionReturn_HVA128_01();
+
+            testReturn_HVA128_02();
+            testReflectionReturn_HVA128_02();
+
+            testReturn_HVA128_03();
+            testReflectionReturn_HVA128_03();
+
+            testReturn_HVA128_04();
+            testReflectionReturn_HVA128_04();
+
+            testReturn_HVA128_05();
+            testReflectionReturn_HVA128_05();
+        }
+    }
+
+    public static int Main(string[] args)
+    {
+
+        HVATests<byte> byteTests = new HVATests<byte>();
+        byteTests.doTests();
+
+        if (byteTests.isPassing)
+        {
+            Console.WriteLine("Test Passed");
+        }
+        else
+        {
+            Console.WriteLine("Test FAILED");
+        }
+
+        return byteTests.isPassing ? PASS : FAIL;
+    }
+}
diff --git a/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdArray_r.csproj b/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdArray_r.csproj
new file mode 100644 (file)
index 0000000..1abe463
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "></PropertyGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <PropertyGroup>
+    <DebugType></DebugType>
+    <Optimize></Optimize>
+    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="VectorMgdMgdArray.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>
diff --git a/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdArray_ro.csproj b/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdArray_ro.csproj
new file mode 100644 (file)
index 0000000..49ca14f
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "></PropertyGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <PropertyGroup>
+    <DebugType></DebugType>
+    <Optimize>True</Optimize>
+    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="VectorMgdMgdArray.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>
diff --git a/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdStatic.cs b/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdStatic.cs
new file mode 100644 (file)
index 0000000..3f5cef3
--- /dev/null
@@ -0,0 +1,1089 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Runtime.Intrinsics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Test passing and returning HVAs (homogeneous vector aggregates) to/from managed code.
+// Test various sizes (including ones that exceed the limit for being treated as HVAs),
+// as well as passing various numbers of them (so that we exceed the available registers),
+// and mixing the HVA parameters with non-HVA parameters.
+
+// This Test case covers all cases for
+//   Methods that take one HVA argument with between 1 and 9 Vectror64 or Vector128 elements
+//   - Called normally or by using reflection
+//   Methods that return an HVA with between 1 and 9 Vectror64 or Vector128 elements
+//   - Called normally or by using reflection
+
+// Remaining Test cases to do:
+// - Add tests that have one than one HVA argument
+// - Add types that are *not* HVA types (e.g. too many vectors, or using Vector256).
+// - Add tests that use a mix of HVA and non-HVA arguments
+
+public static class VectorMgdMgd
+{
+    private const int PASS = 100;
+    private const int FAIL = 0;
+
+    static Random random = new Random(12345);
+
+    public static T GetValueFromInt<T>(int value)
+    {
+        if (typeof(T) == typeof(float))
+        {
+            float floatValue = (float)value;
+            return (T)(object)floatValue;
+        }
+        if (typeof(T) == typeof(double))
+        {
+            double doubleValue = (double)value;
+            return (T)(object)doubleValue;
+        }
+        if (typeof(T) == typeof(int))
+        {
+            return (T)(object)value;
+        }
+        if (typeof(T) == typeof(uint))
+        {
+            uint uintValue = (uint)value;
+            return (T)(object)uintValue;
+        }
+        if (typeof(T) == typeof(long))
+        {
+            long longValue = (long)value;
+            return (T)(object)longValue;
+        }
+        if (typeof(T) == typeof(ulong))
+        {
+            ulong longValue = (ulong)value;
+            return (T)(object)longValue;
+        }
+        if (typeof(T) == typeof(ushort))
+        {
+            return (T)(object)(ushort)value;
+        }
+        if (typeof(T) == typeof(byte))
+        {
+            return (T)(object)(byte)value;
+        }
+        if (typeof(T) == typeof(short))
+        {
+            return (T)(object)(short)value;
+        }
+        if (typeof(T) == typeof(sbyte))
+        {
+            return (T)(object)(sbyte)value;
+        }
+        else
+        {
+            throw new ArgumentException();
+        }
+    }
+    public static bool CheckValue<T>(T value, T expectedValue)
+    {
+        bool returnVal;
+        if (typeof(T) == typeof(float))
+        {
+            returnVal = Math.Abs(((float)(object)value) - ((float)(object)expectedValue)) <= Single.Epsilon;
+        }
+        if (typeof(T) == typeof(double))
+        {
+            returnVal = Math.Abs(((double)(object)value) - ((double)(object)expectedValue)) <= Double.Epsilon;
+        }
+        else
+        {
+            returnVal = value.Equals(expectedValue);
+        }
+        return returnVal;
+    }
+
+    public unsafe class HVATests<T> where T : struct
+    {
+        // An HVA can contain up to 4 vectors, so we'll test structs with up to 5 of them
+        // (to ensure that even those that are too large are handled consistently).
+        // So we need 5 * the element count in the largest (128-bit) vector with the smallest
+        // element type (byte).
+        static T[] values;
+        static T[] check;
+        private int ElementCount = (Unsafe.SizeOf<Vector128<T>>() / sizeof(byte)) * 5;
+        public bool isPassing = true;
+        public bool isReflection = false;
+
+        Type[] reflectionParameterTypes;
+        System.Reflection.MethodInfo reflectionMethodInfo;
+        object[] reflectionInvokeArgs;
+
+        ////////////////////////////////////////
+
+        public struct HVA64_01
+        {
+            public Vector64<T> v0;
+        }
+
+        public struct HVA64_02
+        {
+            public Vector64<T> v0;
+            public Vector64<T> v1;
+        }
+
+        public struct HVA64_03
+        {
+            public Vector64<T> v0;
+            public Vector64<T> v1;
+            public Vector64<T> v2;
+        }
+
+        public struct HVA64_04
+        {
+            public Vector64<T> v0;
+            public Vector64<T> v1;
+            public Vector64<T> v2;
+            public Vector64<T> v3;
+        }
+
+        public struct HVA64_05
+        {
+            public Vector64<T> v0;
+            public Vector64<T> v1;
+            public Vector64<T> v2;
+            public Vector64<T> v3;
+            public Vector64<T> v4;
+        }
+
+        private static HVA64_01  hva64_01_s;
+        private static HVA64_02  hva64_02_s;
+        private static HVA64_03  hva64_03_s;
+        private static HVA64_04  hva64_04_s;
+        private static HVA64_05  hva64_05_s;
+
+        ////////////////////////////////////////
+
+        public struct HVA128_01
+        {
+            public Vector128<T> v0;
+        }
+
+        public struct HVA128_02
+        {
+            public Vector128<T> v0;
+            public Vector128<T> v1;
+        }
+
+        public struct HVA128_03
+        {
+            public Vector128<T> v0;
+            public Vector128<T> v1;
+            public Vector128<T> v2;
+        }
+
+        public struct HVA128_04
+        {
+            public Vector128<T> v0;
+            public Vector128<T> v1;
+            public Vector128<T> v2;
+            public Vector128<T> v3;
+        }
+
+        public struct HVA128_05
+        {
+            public Vector128<T> v0;
+            public Vector128<T> v1;
+            public Vector128<T> v2;
+            public Vector128<T> v3;
+            public Vector128<T> v4;
+       }
+
+        private static HVA128_01 hva128_01_s;
+        private static HVA128_02 hva128_02_s;
+        private static HVA128_03 hva128_03_s;
+        private static HVA128_04 hva128_04_s;
+        private static HVA128_05 hva128_05_s;
+
+        ////////////////////////////////////////
+
+        public void Init_HVAs()
+        {
+            int i;
+
+            i = 0;
+            hva64_01_s.v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            i = 0;
+            hva64_02_s.v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_02_s.v1 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            i = 0;
+            hva64_03_s.v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_03_s.v1 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_03_s.v2 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            i = 0;
+            hva64_04_s.v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_04_s.v1 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_04_s.v2 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_04_s.v3 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            i = 0;
+            hva64_05_s.v0 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_05_s.v1 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_05_s.v2 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_05_s.v3 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+            i += Vector64<T>.Count;
+            hva64_05_s.v4 = Unsafe.As<T, Vector64<T>>(ref values[i]);
+
+            ////////////////////////////////////////
+
+            i = 0;
+            hva128_01_s.v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+
+            i = 0;
+            hva128_02_s.v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_02_s.v1 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+
+            i = 0;
+            hva128_03_s.v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_03_s.v1 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_03_s.v2 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+
+            i = 0;
+            hva128_04_s.v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_04_s.v1 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_04_s.v2 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_04_s.v3 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i = 0;
+            hva128_05_s.v0 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_05_s.v1 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_05_s.v2 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_05_s.v3 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+            i += Vector128<T>.Count;
+            hva128_05_s.v4 = Unsafe.As<T, Vector128<T>>(ref values[i]);
+       }
+
+        public HVATests()
+        {
+            values = new T[ElementCount];
+            for (int i = 0; i < values.Length; i++)
+            {
+                int data = random.Next(100);
+                values[i] = GetValueFromInt<T>(data);
+            }
+
+            Init_HVAs();
+        }
+
+        // Checks that the values in v correspond to those in the values array starting
+        // with values[index]
+        private void checkValues(string msg, Vector64<T> v, int index)
+        {
+            bool printedMsg = false;  // Print at most one message
+
+            for (int i = 0; i < Vector64<T>.Count; i++)
+            {
+                if (!CheckValue<T>(v.GetElement(i), values[index]))
+                {
+                    if (!printedMsg)
+                    {
+                        Console.WriteLine("{0}: FAILED - Vector64<T> checkValues(index = {1}, i = {2}) {3}",
+                                          msg, index, i, isReflection ? "(via reflection)" : "" );
+                        printedMsg = true;
+                    }
+
+                    // Record failure status in global isPassing
+                    isPassing = false;
+                }
+                index++;
+            }
+        }
+
+        // Checks that the values in v correspond to those in the values array starting
+        // with values[index]
+        private void checkValues(string msg, Vector128<T> v, int index)
+        {
+            bool printedMsg = false;  // Print at most one message
+
+            for (int i = 0; i < Vector128<T>.Count; i++)
+            {
+                if (!CheckValue<T>(v.GetElement(i), values[index]))
+                {
+                    if (!printedMsg)
+                    {
+                        Console.WriteLine("{0}: FAILED - Vector64<T> checkValues(index = {1}, i = {2}) {3}",
+                                          msg, index, i, isReflection ? "(via reflection)" : "" );
+                        printedMsg = true;
+                    }
+
+                    // Record failure status in global isPassing
+                    isPassing = false;
+                }
+                index++;
+            }
+        }
+
+        public void Done_Reflection()
+        {
+            isReflection = false;
+        }
+
+        //==========    Vector64<T> tests
+
+        //====================   Tests for passing 1 argumnet of HVA64_01
+
+        // Test the case where we've passed in a single argument HVA of 1 vector.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_01(HVA64_01 arg1)
+        {
+            checkValues("test1Argument_HVA64_01(arg1.vo)", arg1.v0, 0);
+        }
+
+        public void Init_Reflection_Args_HVA64_01()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_01) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_01), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_01_s };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA64_02
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_02(HVA64_02 arg1)
+        {
+            checkValues("test1Argument_HVA64_02(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA64_02(arg1.v1)", arg1.v1, Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA64_02()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_02) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_02), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_02_s };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA64_03
+
+        // Test the case where we've passed in a single argument HVA of 3 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_03(HVA64_03 arg1)
+        {
+            checkValues("test1Argument_HVA64_03(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA64_03(arg1.v1)", arg1.v1, 1 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_03(arg1.v2)", arg1.v2, 2 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA64_03()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_03) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_03), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_03_s };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA64_04
+
+        // Test the case where we've passed in a single argument HVA of 4 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_04(HVA64_04 arg1)
+        {
+            checkValues("test1Argument_HVA64_04(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA64_04(arg1.v1)", arg1.v1, 1 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_04(arg1.v2)", arg1.v2, 2 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_04(arg1.v3)", arg1.v3, 3 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA64_04()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_04) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_04), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_04_s };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA64_05
+
+        // Test the case where we've passed in a single argument HVA of 5 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA64_05(HVA64_05 arg1)
+        {
+            checkValues("test1Argument_HVA64_05(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA64_05(arg1.v1)", arg1.v1, 1 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_05(arg1.v2)", arg1.v2, 2 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_05(arg1.v3)", arg1.v3, 3 * Vector64<T>.Count);
+            checkValues("test1Argument_HVA64_05(arg1.v4)", arg1.v4, 4 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA64_05()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA64_05) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA64_05), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva64_05_s };
+        }
+
+        //===============   Tests for return values if HVA64
+
+        //====================   Tests for return values of HVA64_01
+
+        // Return an HVA of 1 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_01 returnTest_HVA64_01()
+        {
+            return hva64_01_s;
+        }
+
+        public void testReturn_HVA64_01()
+        {
+            HVA64_01 result = returnTest_HVA64_01();
+            checkValues("testReturn_HVA64_01(result.v0)",result.v0, 0);
+        }
+
+        public void Init_Reflection_Return_HVA64_01()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_01), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_01()
+        {
+            Init_Reflection_Return_HVA64_01();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_01 result = (HVA64_01)objResult;
+
+            checkValues("testReflectionReturn_HVA64_01(result.v0)",result.v0, 0);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA64_02
+
+        // Return an HVA of 2 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_02 returnTest_HVA64_02()
+        {
+            return hva64_02_s;
+        }
+
+        public void testReturn_HVA64_02()
+        {
+            HVA64_02 result = returnTest_HVA64_02();
+            checkValues("testReturn_HVA64_02(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA64_02(result.v1)",result.v1, Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA64_02()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_02), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_02()
+        {
+            Init_Reflection_Return_HVA64_02();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_02 result = (HVA64_02)objResult;
+
+            checkValues("testReflectionReturn_HVA64_02(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA64_02(result.v1)",result.v1, Vector64<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA64_03
+
+        // Return an HVA of 3 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_03 returnTest_HVA64_03()
+        {
+            return hva64_03_s;
+        }
+
+        public void testReturn_HVA64_03()
+        {
+            HVA64_03 result = returnTest_HVA64_03();
+            checkValues("testReturn_HVA64_03(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA64_03(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_03(result.v2)",result.v2, 2 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA64_03()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_03), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_03()
+        {
+            Init_Reflection_Return_HVA64_03();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_03 result = (HVA64_03)objResult;
+
+            checkValues("testReflectionReturn_HVA64_03(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA64_03(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_03(result.v2)",result.v2, 2 * Vector64<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA64_04
+
+        // Return an HVA of 4 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_04 returnTest_HVA64_04()
+        {
+            return hva64_04_s;
+        }
+
+        public void testReturn_HVA64_04()
+        {
+            HVA64_04 result = returnTest_HVA64_04();
+            checkValues("testReturn_HVA64_04(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA64_04(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_04(result.v2)",result.v2, 2 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_04(result.v3)",result.v3, 3 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA64_04()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_04), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_04()
+        {
+            Init_Reflection_Return_HVA64_04();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_04 result = (HVA64_04)objResult;
+
+            checkValues("testReflectionReturn_HVA64_04(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA64_04(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_04(result.v2)",result.v2, 2 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_04(result.v3)",result.v3, 3 * Vector64<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA64_05
+
+        // Return an HVA of 5 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA64_05 returnTest_HVA64_05()
+        {
+            return hva64_05_s;
+        }
+
+        public void testReturn_HVA64_05()
+        {
+            HVA64_05 result = returnTest_HVA64_05();
+            checkValues("testReturn_HVA64_05(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA64_05(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_05(result.v2)",result.v2, 2 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_05(result.v3)",result.v3, 3 * Vector64<T>.Count);
+            checkValues("testReturn_HVA64_05(result.v4)",result.v4, 4 * Vector64<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA64_05()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA64_05), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA64_05()
+        {
+            Init_Reflection_Return_HVA64_05();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA64_05 result = (HVA64_05)objResult;
+
+            checkValues("testReflectionReturn_HVA64_05(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA64_05(result.v1)",result.v1, 1 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_05(result.v2)",result.v2, 2 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_05(result.v3)",result.v3, 3 * Vector64<T>.Count);
+            checkValues("testReflectionReturn_HVA64_05(result.v4)",result.v4, 4 * Vector64<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //==========    Vector128<T> tests
+
+        //====================   Tests for passing 1 argumnet of HVA128_01
+
+        // Test the case where we've passed in a single argument HVA of 1 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_01(HVA128_01 arg1)
+        {
+            checkValues("test1Argument_HVA128_01(arg1.v0)", arg1.v0, 0);
+        }
+
+        public void Init_Reflection_Args_HVA128_01()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_01) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_01), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_01_s };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA128_02
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_02(HVA128_02 arg1)
+        {
+            checkValues("test1Argument_HVA128_02(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA128_02(arg1.v1)", arg1.v1, Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA128_02()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_02) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_02), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_02_s };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA128_03
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_03(HVA128_03 arg1)
+        {
+            checkValues("test1Argument_HVA128_03(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA128_03(arg1.v1)", arg1.v1, 1 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_03(arg1.v2)", arg1.v2, 2 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA128_03()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_03) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_03), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_03_s };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA128_04
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_04(HVA128_04 arg1)
+        {
+            checkValues("test1Argument_HVA128_04(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA128_04(arg1.v1)", arg1.v1, 1 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_04(arg1.v2)", arg1.v2, 2 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_04(arg1.v3)", arg1.v3, 3 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA128_04()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_04) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_04), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_04_s };
+        }
+
+        //====================   Tests for passing 1 argumnet of HVA128_05
+
+        // Test the case where we've passed in a single argument HVA of 2 vectors.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public void test1Argument_HVA128_05(HVA128_05 arg1)
+        {
+            checkValues("test1Argument_HVA128_05(arg1.v0)", arg1.v0, 0);
+            checkValues("test1Argument_HVA128_05(arg1.v1)", arg1.v1, 1 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_05(arg1.v2)", arg1.v2, 2 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_05(arg1.v3)", arg1.v3, 3 * Vector128<T>.Count);
+            checkValues("test1Argument_HVA128_05(arg1.v4)", arg1.v4, 4 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Args_HVA128_05()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { typeof(HVA128_05) };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.test1Argument_HVA128_05), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { hva128_05_s };
+        }
+
+        //====================   Tests for return values of HVA128_01
+
+        // Return an HVA of 1 vector, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_01 returnTest_HVA128_01()
+        {
+            return hva128_01_s;
+        }
+
+        public void testReturn_HVA128_01()
+        {
+            HVA128_01 result = returnTest_HVA128_01();
+            checkValues("testReturn_HVA128_01(result.v0)",result.v0, 0);
+        }
+
+        public void Init_Reflection_Return_HVA128_01()
+        {
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_01), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_01()
+        {
+            Init_Reflection_Return_HVA128_01();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_01 result = (HVA128_01)objResult;
+
+            checkValues("testReflectionReturn_HVA128_01(result.v0)",result.v0, 0);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA128_02
+
+        // Return an HVA of 2 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_02 returnTest_HVA128_02()
+        {
+            return hva128_02_s;
+        }
+
+        public void testReturn_HVA128_02()
+        {
+            HVA128_02 result = returnTest_HVA128_02();
+            checkValues("testReturn_HVA128_02(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA128_02(result.v1)",result.v1, Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA128_02()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_02), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_02()
+        {
+            Init_Reflection_Return_HVA128_02();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_02 result = (HVA128_02)objResult;
+
+            checkValues("testReflectionReturn_HVA128_02(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA128_02(result.v1)",result.v1, Vector128<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA128_03
+
+        // Return an HVA of 3 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_03 returnTest_HVA128_03()
+        {
+            return hva128_03_s;
+        }
+
+        public void testReturn_HVA128_03()
+        {
+            HVA128_03 result = returnTest_HVA128_03();
+            checkValues("testReturn_HVA128_03(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA128_03(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_03(result.v2)",result.v2, 2 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA128_03()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_03), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_03()
+        {
+            Init_Reflection_Return_HVA128_03();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_03 result = (HVA128_03)objResult;
+
+            checkValues("testReflectionReturn_HVA128_03(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA128_03(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_03(result.v2)",result.v2, 2 * Vector128<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA128_04
+
+        // Return an HVA of 3 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_04 returnTest_HVA128_04()
+        {
+            return hva128_04_s;
+        }
+
+        public void testReturn_HVA128_04()
+        {
+            HVA128_04 result = returnTest_HVA128_04();
+            checkValues("testReturn_HVA128_04(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA128_04(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_04(result.v2)",result.v2, 2 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_04(result.v3)",result.v3, 3 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA128_04()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_04), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_04()
+        {
+            Init_Reflection_Return_HVA128_04();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_04 result = (HVA128_04)objResult;
+
+            checkValues("testReflectionReturn_HVA128_04(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA128_04(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_04(result.v2)",result.v2, 2 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_04(result.v3)",result.v3, 3 * Vector128<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //====================   Tests for return values of HVA128_05
+
+        // Return an HVA of 3 vectors, with values from the 'values' array.
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public HVA128_05 returnTest_HVA128_05()
+        {
+            return hva128_05_s;
+        }
+
+        public void testReturn_HVA128_05()
+        {
+            HVA128_05 result = returnTest_HVA128_05();
+            checkValues("testReturn_HVA128_05(result.v0)",result.v0, 0);
+            checkValues("testReturn_HVA128_05(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_05(result.v2)",result.v2, 2 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_05(result.v3)",result.v3, 3 * Vector128<T>.Count);
+            checkValues("testReturn_HVA128_05(result.v4)",result.v4, 4 * Vector128<T>.Count);
+        }
+
+        public void Init_Reflection_Return_HVA128_05()
+        {
+            isReflection = true;
+            reflectionParameterTypes = new Type[] { };
+            reflectionMethodInfo = typeof(HVATests<T>).GetMethod(nameof(HVATests<T>.returnTest_HVA128_05), reflectionParameterTypes);
+            reflectionInvokeArgs = new object[] { };
+        }
+
+        public void testReflectionReturn_HVA128_05()
+        {
+            Init_Reflection_Return_HVA128_05();
+
+            object objResult = reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+
+            HVA128_05 result = (HVA128_05)objResult;
+
+            checkValues("testReflectionReturn_HVA128_05(result.v0)",result.v0, 0);
+            checkValues("testReflectionReturn_HVA128_05(result.v1)",result.v1, 1 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_05(result.v2)",result.v2, 2 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_05(result.v3)",result.v3, 3 * Vector128<T>.Count);
+            checkValues("testReflectionReturn_HVA128_05(result.v4)",result.v4, 4 * Vector128<T>.Count);
+
+            Done_Reflection();
+        }
+
+        //////////////////////////////////////////////////
+
+        public void doTests()
+        {
+            //////  Vector64<T> tests
+
+            // Test HVA Vector64<T> Arguments
+
+            test1Argument_HVA64_01(hva64_01_s);
+
+            Init_Reflection_Args_HVA64_01();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA64_02(hva64_02_s);
+
+            Init_Reflection_Args_HVA64_02();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA64_03(hva64_03_s);
+
+            Init_Reflection_Args_HVA64_03();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA64_04(hva64_04_s);
+
+            Init_Reflection_Args_HVA64_04();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA64_05(hva64_05_s);
+
+            Init_Reflection_Args_HVA64_05();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            // Test HVA Vector64<T> Return values
+
+            testReturn_HVA64_01();
+
+            testReflectionReturn_HVA64_01();
+
+
+            testReturn_HVA64_02();
+
+            testReflectionReturn_HVA64_02();
+
+
+            testReturn_HVA64_03();
+
+            testReflectionReturn_HVA64_03();
+
+
+            testReturn_HVA64_04();
+
+            testReflectionReturn_HVA64_04();
+
+
+            testReturn_HVA64_05();
+
+            testReflectionReturn_HVA64_05();
+
+
+            //////  Vector128<T> tests
+
+            // Test HVA Vector128<T> Arguments
+
+            test1Argument_HVA128_01(hva128_01_s);
+
+            Init_Reflection_Args_HVA128_01();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA128_02(hva128_02_s);
+
+            Init_Reflection_Args_HVA128_02();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA128_03(hva128_03_s);
+
+            Init_Reflection_Args_HVA128_03();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA128_04(hva128_04_s);
+
+            Init_Reflection_Args_HVA128_04();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            test1Argument_HVA128_05(hva128_05_s);
+
+            Init_Reflection_Args_HVA128_05();
+            reflectionMethodInfo.Invoke(this, reflectionInvokeArgs);
+            Done_Reflection();
+
+
+            // Test HVA Vector128<T> Return values
+
+            testReturn_HVA128_01();
+            testReflectionReturn_HVA128_01();
+
+            testReturn_HVA128_02();
+            testReflectionReturn_HVA128_02();
+
+            testReturn_HVA128_03();
+            testReflectionReturn_HVA128_03();
+
+            testReturn_HVA128_04();
+            testReflectionReturn_HVA128_04();
+
+            testReturn_HVA128_05();
+            testReflectionReturn_HVA128_05();
+        }
+    }
+
+    public static int Main(string[] args)
+    {
+
+        HVATests<byte> byteTests = new HVATests<byte>();
+        byteTests.doTests();
+
+        if (byteTests.isPassing)
+        {
+            Console.WriteLine("Test Passed");
+        }
+        else
+        {
+            Console.WriteLine("Test FAILED");
+        }
+
+        return byteTests.isPassing ? PASS : FAIL;
+    }
+}
diff --git a/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdStatic_r.csproj b/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdStatic_r.csproj
new file mode 100644 (file)
index 0000000..95f1c1d
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "></PropertyGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <PropertyGroup>
+    <DebugType></DebugType>
+    <Optimize></Optimize>
+    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="VectorMgdMgdStatic.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>
diff --git a/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdStatic_ro.csproj b/src/coreclr/tests/src/JIT/Directed/VectorABI/VectorMgdMgdStatic_ro.csproj
new file mode 100644 (file)
index 0000000..a032c9d
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "></PropertyGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <PropertyGroup>
+    <DebugType></DebugType>
+    <Optimize>True</Optimize>
+    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="VectorMgdMgdStatic.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>